In the fast-paced world of API development and testing, efficiency and flexibility are key. Developers need tools that facilitate the testing and automation of their APIs and allow them to optimize their workflows. With this in mind, we are super excited to introduce a feature that’s been heavily requested by our community: pm.execution.skipRequest() . This function empowers users to skip or stop requests from being sent, all within the pre-request scripts stage of your API testing, providing unparalleled control over your testing and conditional workflows. The function takes effect in the Postman API client, Collection Runner, and Postman Flows.
Here’s an awesome short video, running through the new functionality:
Very nice to see this feature!
Just one small disappointment: there is no specific message in the execution summary, only this “No tests found” which is a bit misleading. I hoped there would be a string parameter to the pm.execution.skipRequest() that would be displayed there.
Thank you anyway!
I’m using the new .skipRequest() feature on a number of requests in a collection I’m running. When running the collection through manual runs in postman, it runs perfectly!
The only small comment is that I’d like the messages of the skipped requests to be clearer/just not appear at all. (In my personal case, it would be a lot cleaner when those requests just don’t show up at all, since I’m skipping quite a lot of requests each run. That would be just like when they have been skipped using .setNextRequest().)
When using newman, I’m getting the following error message: