How to stop collection run on first fail?

Hi. Is there any way to make the Collection Runner stop at the first failed test? It seems that it always runs all requests, even if some tests fail.

My scenario: I get an authentication token with the first request and all following reqests need that token. So it does not make sense to continue if getting the token fails.

This is a scenario where you can use request workflows : Building request workflows | Postman Learning Center

Ideally you will need some sort of if/else statement as you iterate through your collection

if your test fails :
To stop a workflow, add the following code on the Tests tab of a request.


you can take a look at an example of this in :

1 Like