Newman command for running requests inside different folders with different data files

I have a collection in my postman workspace having name say “Collection” inside which there are 2 folders “Folder A” and “Folder B”. Each folder is having multiple requests. I have got 2 data files “Data File A” and “Data File B”. I wanted to run the requests inside Folder A with the “Data File A” attached and requests inside “Folder B” with “Data File B” attached. Wanted to run using Newman.

First I will export the collection in JSON format (Collection.postman_collection) and save it in a folder. What should be the newman run command to run the collection having the above mentioned configuration?

I think you can do this by using --folder option and pass respective data file

1 Like

Found this today and this works How to run a sub-folder in Postman

1 Like