newman
newman copied to clipboard
newman CLI should support fully qualified path for running scripts in a subfolder
Issue: I'm unable to specify a specific folder for execution with newman CLI, when the leaf level folder name is repeated somewhere else in the folder heirarchy for a Postman Collection. Its quite possible that I'm making a silly mistake, but researching online didn't give me specific answers, maybe documentation needs to include an example if the ability exists.
-
Newman Version 4.3.1
-
OS details Linux nkcell460 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
-
Using as CLI
-
Just started using newman. Could not find the answer looking up blogs or online resources, particularly: https://stackoverflow.com/questions/49769010/newman-run-subdirectory-of-a-collection and https://github.com/postmanlabs/newman/pull/1654
-
Expected behaviour: --folder option should support the subfolder specification by fully qualified path under the Collection
-
Command / script used to run Newman: Tried: a. newman run <collection>.json --folder "sample/_identifier" --environment <env>.json -n 1 newman run <collection>.json --folder "final/_identifier" --environment <env>.json -n 1 (i.e. unique parent and the subfoder) Result : Nothing selected for run and b. newman run <collection>.json --folder "fully/qualified/path/final/_identifier" --environment <env>.json -n Result : Nothing selected for run c. newman run <collection>.json --folder "_identifier" --environment <env>.json -n Result : runs hd7 / final / _identifier
Steps to reproduce the problem:
- Create a collection with a folder structure.
- Ensure a folder name is repeated under a different heirarchy
- Try to use different expressions for --folder option for newman cli to execute the folder '_identifer' under sample
If I have a subfolder with the same name somewhere else in the folder structure, how do I select a specific one? --folder "<parentFolder1>/theName" doesn't seem to work. newman version 4.3.1
@niranjankhare This is not supported yet.
For now, you can specify a unique name to your _identifier
and pass that to --folder
option.
:+1: for this too 🙂
Any estimate as to when this will be implemented? For now I have to split out subfolders into separate collections in order to run them individually.
I need this feature too guys :-)
To anyone requesting this, why not submit a PR?
@aurelienlair @jawn @shamasis @codenirvana I've made a PR for this. Are we looking forward to this feature request?
@adityaofficial10 can you give us the link of the PR please?
@aurelienlair I've linked it here.😀
How about running a subfolder within a folder? I've got a deeply nested postman collection comprised of different kinds of tests split by major category and further broken into API versions.
So: postmansuite:
- SuiteA
- v1
- test1
- test2
- v2
- test1
- test2
- v1
- SuiteB
- v1
- test1
- test2
- v2
- test1
- test2
- v1
I'd expect to be able to do something like --folder "SuiteB/v1" to run that nested subfolder?