A framework to execute multiple Postman collections in parallel run with Newman.Includes Allure, HTML-extra and Junit reporters integrations
npm install newman-parallelbash
npm install -D newman-parallel
`
$3
`bash
npx newman-parallel [options]
`
$3
####
- path: (Required) Path to the folder containing Postman collections.
- path: (Required) Path to the folder containing Postman environments.
- C=(name): (Required if no ALL arg provided or no env variables set) Name of the collection/product to filter the collections.
- E=(name): (Optional) Name of the environment to use.
- R=(name): (Optional) pass false if you do not need the reports to be generated.
- D=(path): (Optional) Path to the data file.
- ALL: (Required if no C= argument provided or no env variables set) to run all the collections from the forlder
$3
- the process logic will check the environment variables if there is no Name of the collection/product passed in arguments
- If environment variable equal to the name of the collection's filename is set to true, the framework will run the collection/s that match.
- If the environment variable ENV is set to name of the enfironment file, the framework will use this environment file (in such case you do not need to pass arg E=, otherwise it will have priority over the ENV var)
$3
Run all the collections that matching the MyCollection with no environment used:
`bash
newman-parallel /path/to/collections /path/to/environments C=MyCollection
`
Run collections for a specific name with a specific environment and/or data file:
`bash
this will run collection that have MyCollection name using Bash/GitBash
newman-parallel /path/to/collections /path/to/environments C=MyCollection E=MyEnvironment
this will run collection that have MyCollection and MyCollection2 name using Bash/GitBash
newman-parallel /path/to/collections /path/to/environments C=MyCollection,MyCollection2 E=MyEnvironment
this will run collection that have MyCollection and MyCollection2 with MyEnvironment and using the datafile name using Bash/GitBash
newman-parallel /path/to/collections /path/to/environments C=MyCollection,MyCollection2 E=MyEnvironment D=< relative path to data file >
`
Run collections with a specific environment file(or without) depending on the environment variables specified:
`bash
this will run collections that have XXX and YYY names using Bash/GitBash
export XXX=True
export YYY=True
newman-parallel /path/to/collections /path/to/environments E=MyEnvironment
or without the environment flag passed in arguments
newman-parallel /path/to/collections /path/to/environments
`
Run all the collections with a ALL argument passed (with or without environment):
`bash
this will run all collections without environment file
newman-parallel /path/to/collections /path/to/environments ALL
this will run all collections with specified environment file
newman-parallel /path/to/collections /path/to/environments ALL E=MyEnvironment
``