{"id":18537294,"url":"https://github.com/nareshnavinash/postman-newman-framework","last_synced_at":"2026-03-10T12:35:38.487Z","repository":{"id":49453703,"uuid":"280664062","full_name":"nareshnavinash/Postman-Newman-Framework","owner":"nareshnavinash","description":"Framework to manage and run multiple postman collections in a single run along with the allure reports.","archived":false,"fork":false,"pushed_at":"2022-12-11T14:19:46.000Z","size":351,"stargazers_count":7,"open_issues_count":2,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T09:03:59.457Z","etag":null,"topics":["api-automation","framework","newman","postman","postman-collection","postman-test"],"latest_commit_sha":null,"homepage":"https://nareshnavinash.github.io/Postman-Newman-Framework/","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":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-18T13:39:33.000Z","updated_at":"2024-07-06T18:46:24.000Z","dependencies_parsed_at":"2023-01-27T01:00:46.434Z","dependency_job_id":null,"html_url":"https://github.com/nareshnavinash/Postman-Newman-Framework","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nareshnavinash%2FPostman-Newman-Framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nareshnavinash%2FPostman-Newman-Framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nareshnavinash%2FPostman-Newman-Framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nareshnavinash%2FPostman-Newman-Framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nareshnavinash","download_url":"https://codeload.github.com/nareshnavinash/Postman-Newman-Framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248078269,"owners_count":21044080,"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","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","framework","newman","postman","postman-collection","postman-test"],"created_at":"2024-11-06T19:37:44.664Z","updated_at":"2026-03-10T12:35:33.456Z","avatar_url":"https://github.com/nareshnavinash.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Postman - Newman Framework\n\nA framework to run multiple postman collections in single run by leveraging newman library.\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](library/Postman-Newman.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\n\n## Aim\n\nThis framework is aimed at resolving the above particular issue along with allure reports integration which can be easily integrated with jenkins. \n\n\n## Supports\n* Multiple collections run in single shot\n* Allure reports along with newman's default CLI, HTML \u0026 JSON\n* Jenkins Integration\n* Docker Execution\n\n\n## Pending\n* Need to handle tests with iteration data.\n\n\n## Setup\n* Clone this repository\n* Navigate to the cloned folder\n* Install node and npm using `brew install node`\n* Install the dependencies with respect to this project by `npm install`\n\n\n## To Run the tests\n\nTo make the command line run options easier, added common run options as scripts in `package.json` file.\n\nFor a simple run of all the feature files in normal mode without any video recording, try\n```\nnpm run test -- \u003cFeed_file_which_contains_input_collections\u003e\n```\n\n\n## Allure\nTo open the allure results,\n```\nnpm run serve-allure\n```\nAlong with allure reports, newman's default CLI, HTML 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.\n\nTo clear the all the report files from results directory,\n```\nnpm run clean-report\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,\n```\n#!/bin/bash -l\nnpm list\nls\ncd \u003cpath_to_the_project\u003e\nnpm install\nnpm run test -- \u003cfeed_file\u003e \u003cor custom run option\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 'npm run test -- \u003cfeed_file\u003e' # or custom methods\n            }\n        }\n    }\n}\n```\n\n## Breakdown in to testcases\n\n### Feed files\n\nThe feed file is the core structure for this framework 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    ]\n}\n```\n\nOnce the feed file is prepared, one can directly trigger the test by,\n\n```\nnpm run test -- \u003cFeed_file_which_contains_input_collections\u003e\n```\n\n### Folder structure\n\nIf we need to have the collections inside the folder, then its advisible to have the collections in `collections` folder. All the environment files should be kept under `environment` folder. If we have multiple feed files to run at different stage of development or for different microservices, then have all the feed files under `feed` folder.\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%2Fpostman-newman-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnareshnavinash%2Fpostman-newman-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnareshnavinash%2Fpostman-newman-framework/lists"}