How to run a sub-folder in Postman

I have a collection and many of sub-folder in this collection, how can I run specific folder?
I tried with --folder parameter but it does not work

Hey @Xuyen,

Would you be able to provide some more implementation details and more clarification about what doesn’t work, please?

One of the ways that this might not work is if there were folders with the same name, this might not pick up the correct folder for the run.

Just to show you it working in the most basic way, I’ve created an example below.

If I have a Collection with the structure like this:

Screenshot 2020-02-29 at 08.51.19

Running Newman with the --folder F1 would run both sub-folders:

Running Newman with the --folder F1a would run that folder and the R1 request:

Running Newman with the --folder F1b would run that folder and the R2 request:

This can also work, if there was another sub-folder F1aa, inside the F1a sub-folder:

Hi @dannydainton,

it works perfect with your solution. My wrong as provided the full path for sub-folder like F1/F1a…

Many thanks for your support!

Xuyen Tran

1 Like