0

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.

1 Answers1

0

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/

Christian Baumann
  • 3,188
  • 3
  • 20
  • 37
  • Thanks, Christian, Well as a user, once I run collection from Postman GUI so it simply asks me to tick/select API Requests which I want to execute. So, while running the same collection using Newman-Runner how can I skip those requests? Is there any way to do that or by adding some ignore API requests in some other file? – Muhammad Uzair Dec 21 '21 at 07:30
  • Just read my answer and the provided links, it's all explained there. – Christian Baumann Dec 21 '21 at 07:53