How to recal saved response in tests?


Is it possible to access the collections saved Examples inside tests?

When writing my test scripts, I would like to access the example response body inside the test. Then I would want to compare the structure of the example response body with the actual response and see if the structures match.

Thanks in advance

Hi @tomas.suen,

Correct me if I am wrong, I am guessing you are talking about the Mocking functionality in Postman, if you are, the example response is getting returned back to you as is. There is no need to check if the structures match.
The only thing you have to do is ensure that the URL’s match between the sent request and the saved example request. The following link should be helpful to you: