1.0.7 • Published 4 years ago
postman-automated-reporting v1.0.7
postman-automated-reporting
A command line utility for testing Postman collections with reporting and logging.
Features
- Faster than Postman GUI
- Supports CLI
- Supports reporting and logging
- Can be used to specify which apis to test
Installation
npm install -g postman-automated-reporting
Usage
Once the package is installed, you can use it either in code, or as a command
In code :
const runner = require('postman-automated-testing'); // Requiring package
var collection = '/path/to/collections.json'; // Path to JSON file containing collections
var environment = '/path/to/environment.json'; // Path to JSON file containing which environment to use
var apis = ['account', 'billing']; // In case you want to test specific apis only
var reporting_path = '/path/to/reporting.html'; // Path to the HTML file where the reporting will be saved
var log_path = '/path/to/reporting.log'; // Path to the text file where the log will saved
runner.run_postman_collections(collection, environment, apis, reporting_path, log_path);
As a command :
par run <collection> <options>
- collection : Path to JSON file containing collections
- options :
--env : Path to JSON file containing which environment to use
--apis : Contains which apis to test, comma separated
--reporting : Path to the HTML file where the reporting will be saved
--log : Path to the text file where the log will saved
Example : par run collections.json --env prod.json --apis=account,address --reporting report.html --log report.log