I have a basic test in my collection to check if the API returns a “Status code is 200”. When I run this via the collection it passes. But when I run it via the monitor it fails with the following error. Any thoughts?
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
Could it be that you are following a redirect?
This is an option when setting up monitors (not sure how it works as i’ve not used it, but a redirect is a 201 code i believe)