Muhammad Uzair
Muhammad Uzair

Reputation: 30

Can I skip some of the selected "Api Requests" in postman while using it through Newman-Runner-CLI?

As a user, I have several API collections created using postman and now I've integrated the Newman-Runner-CLI.

My question is that, is there any way to skip some of the selected API Requests from each collection, or is there is any way to add "Skipped API Requests" in a single file so during the execution process of Newman-Runner, it will automatically skip those added requests?

Thanks in advance.

Upvotes: 0

Views: 986

Answers (1)

Christian Baumann
Christian Baumann

Reputation: 3444

Apparently, there's no way to find out if a collection is being run via Postman or Newman.

According to this thread, you could manually set a variable at the start of the execution (see Postman forum).

You could then steer the execution with postman.setNextRequest() depending on the value of that variable. See: https://learning.postman.com/docs/running-collections/building-workflows/

Upvotes: 0

Related Questions