collections-runner
v1.0.23
Published
Interactive CLI for postman collections on top of newman.
Downloads
6
Readme
Collections-runner
Interactive CLI for postman collections on top of newman. Can be used to test APIs. Can be used to develop APIs or applications using APIs.
Features
- Run postman collections with custom environment variables in a unique command line
- Display all available routes and collections
- Quickly set default development or staging environment variables
- Multi-select routes to run
- Enable CI environment to be integrated to CI tests
- Select environment variables to update among the ones used in the selected routes
- Store environment variables in a local file to be used on next run
- Display run report on an html file
Install
# If you use npm:
npm install --save-dev collections-runner
# Or if you use Yarn:
yarn add -D collections-runner
Create a postman
folder at the root of your project.
This folder contains :
- Add a
postman_collection.json
containing your postman collections - Add a
postman_environment.json
containing your postman environment - Add a
postman_environment.local.json
containing your local postman environment, this file should be gitignored as it is updating after each run - Add a
default.dev.json
containing default environment variables for your dev environment (typically your local url) - Add a
default.staging.json
containing default environment variables for your staging environment (typically your staging url)
Usage
Runs postman collections.
yarn collections-runner [routes names] [collections flags or vars]
# Exemple for CI job:
yarn collections-runner --ciEnvironment --updateLocalEnvironment=false --reporter=html --reporterPath='./newman/output/report.html'
Is used to interactively construct collections-runner commands.
yarn collections-automator