问题
I am using the Postman Collection Runner to run the same request multiple times using iterations. My tests work as expected, but I'm not able to see the individual responses for each request.
Is it possible to view the responses for requests in the Postman Collection Runner?
回答1:
In the latest version of Postman you can see all the data from the collection run for each individual request.
In the Collection Runner, Click on the request name and all the details of the request and response can be viewed.
More information can be going on the Debugging using the Request & Response body section of this page
回答2:
This might help somebody, I tried
pm.test(responseBody, true)
and this printed the response in run summary.
回答3:
Let me add more details about the shadowcharly solution.
Your results may be viewed if you assign responseBody
variable to tests array (in Tests
tab)
tests["body"] = responseBody
and export it as json (on the interface you only see the zero/one results if test passed or not).
It's not very useful but this is the only way I've found.
回答4:
If you are repeating exactly the same query, you could use the test name to show the result:
tests['Test to see value of key Key'+ keyValue] = testResult....
You will have a different test for each value received, not exactly a log, but works fantastic ;)
来源:https://stackoverflow.com/questions/39371424/how-can-i-view-responses-in-postman-collection-runner