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:
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 @danny-dainton,
it works perfect with your solution. My wrong as provided the full path for sub-folder like F1/F1aβ¦
Many thanks for your support!
Thanks,
Xuyen Tran
Does this mean that all subfolders have to have unique names in order for you to target a specific subfolder (using --folder {sub-folderName})? I ask because with the way i have my collection structured, i have several subfolders containing duplicate names and it would be a real hassle to have to go back through each and every subfolder and re-name them to something unique. Why doesnβt postman provide the capability to simply provide the collection folder path to the subfolder in question??
Hi @danny-dainton ,
i am facing the issue similar like this , i have one collection and with in that i have one folder and many subfolders with in that .
When i run the folder only the first subfolder is running and remaining subfolders are not getting runned . Do you know why this happens ,
Below is my structure
Here C4PO is my collection and CRUD is my folder and you can see subfolders like carriers,warehouse etc .
When i run using the following command newman run
C4PO.postman_collection.json --folder "CRUD"
it is only running the first subfolder i.e carriers .
Thanks in advance
Happy Testing
Hi @varikuti,
it should run all folder inside CRUD, when I tried the same it is working fine, update the collections and export, then try running one more time, thanks
Hi @SaravananSeenivasan ,
i figured out the issue on why it is not running the subfolders. i have next requests in pre-request and for the last request i have kept next request as null . So it is stopping to run other subfolders because of that. Thanks for the reply.
Regards
Bharath
Hi @danny-dainton, @SaravananSeenivasan ,
I am trying to execute a collection with many sub-folders from Newman. Do the requests be named unique names to execute all requests in the Subfolders?
All sub-folders now contain the same set of requests. When I run the collection only requests from first sub-folder gets executed.
Thank you!
Indu
@indu In my experience that is indeed the case Iβve had to make sure they have unique names instead of being able to do the path
Hello all,
I think I have found a solution for this.
Suppose you have multiple folders and subfolders in your collection like the following:
I want to run the requests R1 & R3.
Simply add in your command --folder R1 β folder R3
same problem here