@suban5/postman-parallel-runner
v1.0.4
Published
Run multiple Postman collections in parallel from a single config file
Maintainers
Readme
Postman Parallel Collection Runner
Run multiple Postman API collections in parallel from one configuration file.
Installation
Prerequisites
- Node.js 14 or later
- Postman CLI
Install Postman CLI:
npm install -g postman-cliInstall this tool:
npm install -g @suban5/postman-parallel-runner@latestQuick Start
1) Create a configuration (minimal working config)
postman-parallel --initYou can also copy any template from the examples below and modify it based on your requirements.
2) Validate configuration
postman-parallel --validate3) Run collections
postman-parallelReports are written to ./results by default.
Usage
Basic commands
postman-parallel --init # Create config interactively
postman-parallel --validate # Validate config file structure and values
postman-parallel --list # Preview collections that will run
postman-parallel --doctor # Check runtime setup and dependencies
postman-parallel --help # Show usage and available options
postman-parallel --version # Show installed CLI versionRun with a specific configuration
postman-parallel --config ./config.jsonpathToConfig can be either a relative path (for example ./config_simple.json) or an absolute path (for example C:/work/config_simple.json on Windows).
Continue running all collections after failures
postman-parallel --config ./config.json --continue-on-errorConfig Templates
Use these examples as starter files. Copy a template and adjust values such as pathToCollection, pathToEnvironment, pathToResultsFolder, and filename.
config_simple.json (folder-based collections)
{
"collectionsFolder": "./collections",
"parallel": true,
"continueOnError": true,
"reporters": "cli,json,html",
"exportResultsFolder": "./results"
}config_diff_collection_environment.json (different environment per collection)
{
"collections": [
{
"collection": "./collections/collectionA.postman_collection.json",
"environment": "./environments/envA.postman_environment.json",
"output": "filenameA"
},
{
"collection": "./collections/collectionB.postman_collection.json",
"environment": "./environments/envB.postman_environment.json",
"output": "filenameB"
}
],
"parallel": true,
"continueOnError": true,
"maxConcurrency": 2,
"reporters": "cli,json,html",
"exportResultsFolder": "./results/multiEnv"
}config_cloud_ids.json (Postman cloud collection/environment IDs)
{
"collections": [
{
"collection": "collectionId1",
"environment": "environmentId1",
"output": "filename1"
},
{
"collection": "collectionId2",
"environment": "environmentId2",
"output": "filename2"
}
],
"parallel": true,
"continueOnError": true,
"maxConcurrency": 2,
"reporters": "cli,json,html",
"exportResultsFolder": "./results/cloudIdResults"
}config_custom_output_paths.json (custom subfolder output names)
{
"collections": [
{
"collection": "./collections/collectionA.postman_collection.json",
"environment": "./environments/test.postman_environment.json",
"output": "folderA/filenameA"
},
{
"collection": "./collections/collectionB.postman_collection.json",
"environment": "./environments/uat.postman_environment.json",
"output": "folderB/filenameB"
}
],
"parallel": true,
"continueOnError": true,
"maxConcurrency": 2,
"reporters": "cli,json,html",
"exportResultsFolder": "./results/customFolders"
}Run with any config template
postman-parallel --config pathToConfigExamples:
postman-parallel --config ./config_simple.json
postman-parallel --config ./config_diff_collection_environment.json
postman-parallel --config C:/work/config_cloud_ids.jsonOptional Fields
You can add or remove optional fields based on your use case.
environment(global): defaultpathToEnvironmentfor all collectionsmaxConcurrency: limit parallel runscontinueOnError: continue remaining collections when one collection fails (default:truewhen omitted)output: customfilename(orfolder/filename) per collectionexportResultsFolder: custompathToResultsFolderparallel: setfalsefor sequential execution
Documentation
Support
Contributing
Contributions are welcome.
- Fork the repository
- Create a branch:
git checkout -b feature/my-change - Commit your changes
- Push your branch
- Open a pull request
License
This project is licensed under the MIT License.
