How to run subfolders of a collection in newman? Only selected subfolders, not the whole collection

Hi all, I like to run a subfolder of my collection in newman. I have a collection that contains many subfolders, if I export as JSON and run in Newman, it runs the whole collection. But I want to run only one folder inside my collection in Newman, So if anyone knows the solution please help me.

Hi Issac :raising_hand_woman:t2:!

To run a subfolder of your collection using the Newman CLI, all you would need to do is specify its’ name after the folder tag.

E.g. I have a subfolder in my Airtable API Collection called Types Table. To run only this subfolder, I’ll use the following command:

newman run Airtable\ API.postman_collection.json --folder "Types Table"

Btw, @danny-dainton answered a similar question in greater detail here!

1 Like

Thank You, I’m able to run subfolders

1 Like

Hello [maricrisbonzo]
Thanks a lot for your reply
is it possible to run each subfolder with individual data driven input file ?
i have specified some example below
newman run Airtable\ API.postman_collection.json --folder “Types Table1” -d testData1.json
newman run Airtable\ API.postman_collection.json --folder “Types Table2” -d testData.json

Do you know if it’s possible to run a sub-sub-sub folder? Just how much folder nesting is possible and what the newman commandline would look like?

If the folder has a unique name, you could use the --folder flag to run it?

It’s worth exploring that and trying it out.

Yup. Felt pretty dumb asking w/o even trying it.

Permission vs. forgiveness

Thank you @danny-dainton .

1 Like