Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Check for particular values in the response body

pm.test("Person is Jane", () => {
  const responseJson = pm.response.json();
  pm.expect(responseJson.name).to.eql("Jane");
  pm.expect(responseJson.age).to.eql(23);
});
Source by learning.postman.com #
 
PREVIOUS NEXT
Tagged: #Check #values #response #body
ADD COMMENT
Topic
Name
1+7 =