0

in automation postman script, how to rerun the same api if the response is 500 instead of 200, till api's response is other than 500.

pm.test("Status code should be 200 on invalid user", function () {
    pm.response.to.have.status(200); 
});
Riya
  • 37
  • 2
  • 7
  • If with same data sometimes it's 500, sometimes it's 200, then first fix your server – Justinas Apr 10 '20 at 10:10
  • @Justinas server is fine because is happens rarely 1 out of 96 runs, but i have to changes in this script only, if other error come it this same api should again run. – Riya Apr 10 '20 at 10:23

0 Answers0