In Postman, is there a way to compare the API response body to an external JSON file (which contains the expected response body)?
It is well documented on how to feed the request body from an external file, but I can’t find much on bringing in external data to be used outside the request body.
Right now, the only way I know how to do this comparison is to paste the expected response body in to the Pre-req or tests section. But I have hundreds of cases where I have
- the request body in one file
- the expected response body in a different file
How can I bring the JSON in from each file to compare the response body to the expected response body?