Postman tips and tricks
Store the json reponse in a variable
var jsonData=pm.response.json();
let saveData=JSON.stringify(jsonData);
pm.environment.set("get-ip-response",saveData);
check the response time
pm.test("Response time is less than 3000ms", function () {
pm.expect(pm.response.responseTime).to.be.below(3000);
});
check the response status
pm.test("Status code name has OK", function () {
pm.response.to.have.status("OK");
});
create environments in postman like QA and Perf or Prod
- and use the same api