# Postman - Stop the collection runner if a an assertion associated with a test fails

**URL:** <https://community.postman.com/t/postman-stop-the-collection-runner-if-a-an-assertion-associated-with-a-test-fails/34887>\
**Category:** Help Hub\
**Tags:** tests, collection-runner\
**Created:** [April 29, 2022, 12:45pm UTC](https://community.postman.com/t/postman-stop-the-collection-runner-if-a-an-assertion-associated-with-a-test-fails/34887 "2022-04-29T12:45:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesperer](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jesperer](https://community.postman.com/u/jesperer)\
**Post date:** [April 29, 2022, 12:45pm UTC](https://community.postman.com/t/postman-stop-the-collection-runner-if-a-an-assertion-associated-with-a-test-fails/34887/1 "2022-04-29T12:45:01Z")

</div>

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.
