As the title says, I have around 20 requests in a folder that each has some test assertion that looks at the response. I want to terminate the collection runner if one assertion fails. What happens right now is that the collection runner keeps running, something I want to avoid.
I’ve googled and seen that you can use logic in tests and set " postman.setNextRequest(null); " if a test failed. However, that would mean modifying all 20 requests. I estimate that my collection will grow to around 100 requests in the future which would mean a ton of duplicated logic. If I wanted to change this logic at a later point I would have to do it for all 100 requests.
Is there a nice way of doing this? One idea I had is if you could use the pre-request script for my folder to check if the previously ran request had any assertions fails, and if so stop running the upcoming requests.