Debugging a collection run

Sometimes your Collection tests fail — even when you expect them all to pass.

When failure occurs, you can debug your requests in two ways:

You can explore debugging an example request in the Postman Echo collection. Go to Postman Echo, and click the Run in Postman button to import this collection into the Postman app.

In Postman, click the Runner button on the left side of the header to open the Collection Runner window.

Select the "Postman Echo" collection and click the Run Postman Echo button. The image below shows the results of the collection run.

collection runner view

In the Delete Cookies request, a certain cookie is expected to be returned by the server since the Postman Echo Cookies endpoint returns whatever cookies are sent to it.

As you can see, this test is failing. Read on to investigate further.

Debugging using the Request and Response body

In this test, a cookie named foo1 is expected to be returned as part of the response.

Click on any request name in your collection run results to display a tooltip. This tooltip contains information about your request and response to help you figure out what went wrong.

Expand the Response Body section, to see the response does not contain the expected cookie expect.

tooltip for request

Moreover, expand the Response Headers section to see the cookie was not sent at all. Something must be wrong with the way Postman Echo handles cookies. Now you can go ahead and patch this up in your API and try again.

collection runner view

You can control which bodies display in the tooltip by updating your preference in the Log Responses dropdown when starting a collection run. Note that only response bodies less than 300KBs will be displayed. Your response headers and bodies are never synced with your Postman account for privacy reasons.

Debugging using the Postman Console

The Postman console records and displays all network requests and user log statements.

Find the request that's causing problems here by expanding its response headers. Here too, the Postman Echo endpoint did not return a cookie, and indicates why the test is failing. You can then infer that the endpoint is misbehaving and needs to be reviewed.

postman console view

Learn more about debugging with the Postman console.