Skip to content

Uses postman's newman module to run exported POSTMAN collections and generate detailed reports

License

Notifications You must be signed in to change notification settings

hanikhan/postman-collection-runner

Repository files navigation

POSTMAN COLLECTION RUNNER

Setup

  • Clone the repo
  • Navigate to the folder using cd folder_name_of_cloned_repo
  • Install dependencies by running the command npm install
  • Run npm start to launch the UI for collection runner, access the UI at localhost:8000

Setup Details

  • All test json files (created manually or exported from POSTMAN) should be placed under tests folder
  • All test environment files should be placed under env folder
  • Reports generated by the test framework can be found under result folder

Running tests using UI

  • All test suites placed under tests folder should be accessible under API Suites drop down on the UI, select a suite to run from this drop down
  • All test environments placed under env folder should be accessible under Environments drop down on the UI, select an environment the test suite should run against.
  • Click Run Test using predefined API Suite button to start the test run
  • If you wish to run a POSTMAN collection directly, simply post the collections URL in the textbox available on the UI and click Run Test using POSTMAN Collection URL button
Viewing Reports
  • Once the tests are complete, the reports can be accessed by clicking the SEE REPORTS>> link on the UI

Running tests from Command Line:

  • Run the following command using CLI(Exported collections file is available):
newman run -e <environment>.json <collection>.json --reporters cli,html --reporter-html-template <template_file>.hbs --reporter-html-export <report>.html
  • Run the following command to run a collection directly using a shareable link from POSTMAN:
newman run https://www.getpostman.com/collections/XXXXX -e <environment>.json --reporters cli,html --reporter-html-template <template_file>.hbs --reporter-html-export <report>.html
  • Reports can be accessed under the path specified for --reporter-html-export parameter on CLI.

Built With

Future Enhancements

  1. Ability to store multiple reports based on timestamp/testsuite/test environment
  2. Integrate the UI along with reports within a Chrome Extension

About

Uses postman's newman module to run exported POSTMAN collections and generate detailed reports

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published