{"id":17981150,"url":"https://github.com/nareshnavinash/newman-run","last_synced_at":"2025-10-15T17:27:50.522Z","repository":{"id":52704883,"uuid":"280851173","full_name":"nareshnavinash/newman-run","owner":"nareshnavinash","description":"Run multiple postman collections along with predefined configs using a single feed file. Reduces command-line arguments since reporting (allure, JSON, CLI, and HTML) is embedded internally.","archived":false,"fork":false,"pushed_at":"2024-05-13T13:39:52.000Z","size":348,"stargazers_count":18,"open_issues_count":6,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-12T23:41:22.171Z","etag":null,"topics":["api-automation","newman","newman-run","npm","npm-package","postman","runner"],"latest_commit_sha":null,"homepage":"https://nareshnavinash.github.io/newman-run/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nareshnavinash.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGE_LOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-19T11:27:17.000Z","updated_at":"2025-01-23T01:23:38.000Z","dependencies_parsed_at":"2024-04-15T13:47:21.969Z","dependency_job_id":"b08a337c-8e91-4833-ae2e-37d5017b582f","html_url":"https://github.com/nareshnavinash/newman-run","commit_stats":{"total_commits":35,"total_committers":6,"mean_commits":5.833333333333333,"dds":"0.48571428571428577","last_synced_commit":"0b6cd3c61a5254e1b023e35b6ef13aa6402e2b14"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nareshnavinash/newman-run","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nareshnavinash%2Fnewman-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nareshnavinash%2Fnewman-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nareshnavinash%2Fnewman-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nareshnavinash%2Fnewman-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nareshnavinash","download_url":"https://codeload.github.com/nareshnavinash/newman-run/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nareshnavinash%2Fnewman-run/sbom","scorecard":{"id":674557,"data":{"date":"2025-08-11","repo":{"name":"github.com/nareshnavinash/newman-run","commit":"d4cd2d36103676fd934ed347b78f54be6ab5775b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":3,"reason":"Found 6/16 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T21:06:16.871Z","repository_id":52704883,"created_at":"2025-08-21T21:06:16.871Z","updated_at":"2025-08-21T21:06:16.871Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279091003,"owners_count":26101366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-automation","newman","newman-run","npm","npm-package","postman","runner"],"created_at":"2024-10-29T18:08:05.444Z","updated_at":"2025-10-15T17:27:50.490Z","avatar_url":"https://github.com/nareshnavinash.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Newman-Run\n\nA package to run multiple postman collections in single run by leveraging newman library. This will help us to merge and view the results of multiple collections in a single place using allure.\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)\n[![Made with JavaScript](https://img.shields.io/badge/Made%20with-JavaScript-yellow.svg)](https://www.ruby-lang.org/en/)\n[![StackOverflow](http://img.shields.io/badge/Stack%20Overflow-Ask-blue.svg)]( https://stackoverflow.com/users/10505289/naresh-sekar )\n[![Contributions Welcome](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![email me](https://img.shields.io/badge/Contact-Email-green.svg)](mailto:nareshnavinash@gmail.com)\n\n\n![alt text](lib/Newman-Run.png)\n\n\n## Prevailing Problem\n\nIf we need to run multiple postman collections or single postman collections with multiple environments, then it becomes we need to have multiple command lines as,\n\n```\nnewman run \u003cfile1.json\u003e\nnewman run \u003cfile2.json\u003e -e \u003cenv1.json\u003e\nnewman run \u003cfile2.json\u003e -e \u003cenv2.json\u003e\n...\n```\n\nAlso, if we need to have multiple reports along with this run, we need to specify those each of these command line run along with the folder in which the reports should be generated as,\n\n```\nnewman run \u003cfile1.json\u003e --reporters cli,html,allure --reporter-html-export htmlOutput.html --reporter-allure-export \u003callure-results-out-dir\u003e\nnewman run \u003cfile2.json\u003e -e \u003cenv1.json\u003e --reporters cli,html,allure --reporter-html-export htmlOutput.html --reporter-allure-export \u003callure-results-out-dir\u003e\nnewman run \u003cfile2.json\u003e -e \u003cenv2.json\u003e --reporters cli,html,allure --reporter-html-export htmlOutput.html --reporter-allure-export \u003callure-results-out-dir\u003e\n\n```\n\nSo, as we can see the params that we are passing in the commandline keeps on increasing and its much difficult to consolidate and have a single report for multiple newman run. In Python or in Ruby test runs we have profiles that we can specify during a run which will have most of the static commandline params. \n\nAlso to run different collections at the same time, we need to depend on the shell's default multi run with `\u0026\u0026` between multiple newman runs. Here, if we are running three newman runs as,\n\n```\nnewman run \u003cfile1.json\u003e \u0026\u0026 newman run \u003cfile2.json\u003e \u0026\u0026 newman run \u003cfile3.json\u003e\n```\n\nand if the `file2.json` takes long time to run than other two, then if we have any failures in `\u003cfile1.json\u003e` or `\u003cfile2.json\u003e` that will not be shown in the jenkins jobs or any CI tools such as bitbucket pipeline. This happens because the result of the run which completes at last takes precedence over others.\n\n\n## Aim\n\nThis package is aimed at resolving the above particular issue along with allure reports integration which can be easily integrated with jenkins. This allows us to run multiple collections defined in a single json file and run all the collections in one shot and have a combined reports at allure.\n\n\n## Supports\n* Multiple collections run in single shot\n* Allure reports along with newman's default CLI, HTML, HTMLEXTRA \u0026 JSON\n* Jenkins Integration\n* Docker Execution\n\n\n## Pending\n* Need to handle tests with iteration data.\n* Need to add multi-thread run. (To parallelize the test run **Help Needed**)\n\n\n## Installation\nThe easiest way to install Newman-Run is using NPM. If you have Node.js installed, it is most likely that you have NPM installed as well.\n\n```\nnpm install -g newman-run\n```\nThis installs Newman-Run globally on your system allowing you to run it from anywhere. If you want to install it locally, Just remove the -g flag.\n\nIf you want this to be added to your package.json, run with either `--save` or `--save-dev` depending on your usage.\n\n\n## Usage\n\nTo check for the available commandline arguments use `newman-run --help`\n\n### Multi-Collection run\n\nHere we can see our original aim to run multiple collections in single shot.\n\nFor a simple run of all the feature files in normal mode, try\n```\nnewman-run -c \u003cFeed_file_path_which_contains_input_collections\u003e\n```\n\nHere we are going to use the feed file extensively to make our package run multiple collections at a time. Feed file is nothing but a json file where we need to specify the path of collection and environment JSON's.\n\n#### Feed files\n\nThe feed file is the core structure for this package to function. In the feed file, one has to specify the collections and environment json files path or the url in the array format inside `runs` variable like,\n\n```\n{\n    \"runs\":[\n        {\n            \"collection\": \"./collections/test_scripts.postman_collection.json\"\n        },\n        {\n            \"collection\": \"./collections/file_upload_collection.postman_collection.json\",\n            \"environment\": \"./environment/test_environment.json\"\n        }\n        \n    ]\n}\n```\n\nIf we have only collections that need to be run as part of the test, then have `collection` alone. If we have collection and environment files, then we need to specify both `collection` and `environment` in json format.\n\nWhen we initiate the tests, the `runs` array will be iterated and all the tests will be run using `newman` package. \n\nIdeally we should have the postman collection link as the feed file input, this gives us the leverage of modifying the tests via postman without touching the core framework. The ideal feed file will be,\n\n```\n{\n    \"runs\":[\n        {\n            \"collection\": \"https://www.getpostman.com/collections/57c3cfef239jeijw39d93\"\n        },\n        {\n            \"collection\": \"https://www.getpostman.com/collections/57c3cfef239jeijwew282\",\n            \"environment\": \"./environment/test_environment.json\"\n        },\n        {\n            \"collection\": \"https://www.getpostman.com/collections/57c3cfef239jeijwew282\",\n            \"environment\": \"./environment/dev_environment.json\"\n        },\n        {\n            \"collection\": \"https://www.getpostman.com/collections/57c3cfef239jeijwew282\",\n            \"environment\": \"./environment/prod_environment.json\"\n        }\n    ]\n}\n```\n\nOnce the feed file is prepared, one can directly trigger the test by,\n\n```\nnewman-run -f \u003cFeed_file_which_contains_input_collections\u003e\n```\n\nNow as you can see, you can specify N number of environment combinations with the same collection file or different collection file. All these will run in one shot and we can have a collated result view in the allure.\n\n#### A/Synchronous mode\n\nBy default, the collections are executed asynchronously via the mechanism of Javascript's callback functions: in this way the collections are executed interleaved, all in parallel, without respecting the order in which the collections are defined in the runs.json file.\nBy specifying the '-s' or '--synchronous' option, the system will execute all calls in order one collection at a time. E.g. first all calls from collection 1, then all calls from collection 2, etc. always in the order of definition within the collection. As newman would do by default.\n\n```\nnewman-run -s -f \u003c./feed/\u003cfeed_file.json\u003e\n```\n\n### To achieve basic newman functionality along with reports\n\nTo support the basic `newman` functionality, the `newman-run` command allows you to specify a collection to be run. You can easily export your Postman Collection as a json file from the Postman App and run it using Newman.\n\n```\nnewman-run -c \u003c./collection/\u003cexample_collection.json\u003e\n```\n\nIf you have environment file to be passed, you can conviniently do the same.\n\n```\nnewman-run -c \u003c./collection/\u003cexample_collection.json\u003e -e \u003c./environment/\u003cexample_env.json\u003e\n```\n\nYou can also specifiy both the feed file as well as collections at the same time.\n\n```\nnewman-run -f \u003c./feed/\u003cfeed_file.json\u003e -c \u003c./collection/\u003cexample_collection.json\u003e\n```\n\nThis allows us to run any collection dynamically along with our set of collections.\n\nThe above will take care the reporting part and we don't need to mention about that from the command line. Along with allure reports, newman's default CLI, HTML, HTMLEXTRA and JSON reports are added which can be found at `reports/` path. For sophesticated classification, reports for each collection is isolated with different name. If needed JSON and HTML files can be pushed to S3 for further processing or to have a record.\nYou can configure the list of reporters to use:\n\n```\nnewman-run -f \u003c./feed/\u003cfeed_file.json\u003e -R cli html htmlextra json allure\n```\n\n### Remove previous run report files\n\nIn order to remove the report files that are generated in the previous run, run command of `-r` can be added. This will clear the reports folder and then will have only the files that are corresponding to the current run.\n\n```\nnewman-run -r -f \u003c./feed/\u003cfeed_file.json\u003e\n```\n\n### **NOTE:-**\nWe need to give the file path along with the current working directory i.e., along with `./` symbol. This ensures that the proper file path is given and its used to compute the relative path in the code.\n\n## Allure\nTo open the allure results,\n```\nallure serve reports/allure\n```\nTo install allure follow https://docs.qameta.io/allure/ with your respective machine.\n\n\n## Jenkins Integration with Docker images\nGet any of the linux with cypress docker image as the slaves in jenkins and use the same for executing the UI automation with this framework (Sample docker image - `https://hub.docker.com/r/postman/newman/`). From the jenkins bash Execute the following to get the testcases to run (Provided newman-run is added to the package.json dependencies),\n```\n#!/bin/bash -l\nnpm list\nls\ncd \u003cpath_to_the_project\u003e\nnpm install\nnewman-run -f \u003c./feed/\u003cfeed_file.json\u003e\n```\n\nIn Jenkins pipeline, try to add the following snippet to execute the tests,\n```\npipeline {\n    agent { docker { image 'postman/newman' } }\n    stages {\n        stage('build') {\n            steps {\n                sh 'cd project/'\n                sh 'npm install'\n                sh 'newman-run -f \u003c./feed/\u003cfeed_file.json\u003e' # or different files\n            }\n        }\n    }\n}\n```\n\n## Sample Framework structure\n\nIf you are looking for proper framework structure up on which this package is built on you can see [Postman-Newman-Framework](https://nareshnavinash.github.io/Postman-Newman-Framework/)\n\n\n## Built With\n\n* [Newman](https://www.npmjs.com/package/newman) - Automation core framework to run Postman collections.\n* [Newman-Allure](https://www.npmjs.com/package/newman-reporter-allure) - For Detailed reporting.\n\n## Contributing\n\n1. Clone the repo!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Create a pull request.\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on code of conduct, and the process for submitting pull requests.\n\n## Authors\n\n* **[Naresh Sekar](https://github.com/nareshnavinash)**\n\n## License\n\nThis project is licensed under the GNU GPL-3.0 License - see the [LICENSE](LICENSE) file for details\n\n## Acknowledgments\n\n* To all the open source contributors whose code has been referred in this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnareshnavinash%2Fnewman-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnareshnavinash%2Fnewman-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnareshnavinash%2Fnewman-run/lists"}