1.1.0 • Published 2 years ago
@schwabyio/xrunner v1.1.0
Table of Contents
xRunner - CLI Runner For Postman
Overview
xRunner is a command line interface (CLI) app that extends Newman to enable your organization to run Postman tests with speed and at scale. These are the xRunner specific features:
- Direct support for xtest
- Run tests locally or as part of Continuous Integration (CI) testing
- Configuration support using a settings.json file with command line override capability
- Run Postman tests in parallel with a simple configurable
limitConcurrency
setting - Group tests for projects however you like using project-level test suites.json definition files
- Test results in html format that are intuitive and easy to understand
- Summary results sent to your chosen Slack channel
Demos
Demo Primary Commands
Demo Reporting
Installation Steps
- Prerequisite: Install Node.js (skip step if you already have)
- Clone xRunner project in the location of your choice (i.e.
[YOUR-GIT-BASE-PATH]
):
git clone git@github.com:schwabyio/xrunner.git
- Install dependencies:
cd xrunner
npm install
- Create the following settings.json file (NOTE: this file is not stored in Git):
[YOUR-GIT-BASE-PATH]/xrunner/settings/settings.json
- Edit the settings.json with the configurations for your testing needs. All configurations are documented here. NOTE: comments are allowed. Below is an example:
{
"limitConcurrency": 10,
"autoOpenTestResultHtml": true,
//"sendSummaryResultsToSlack": true,
"slackChannel": "C04XXXXXXXX",
"slackToken": "xoxb-XXXXXXXXXXXXXXXXXXXXXXXXX",
"slackHardAlertOnFailure": true,
"projectName": "xtest",
"environmentType": "dev1",
"xRunnerProjectPath": "[YOUR-GIT-BASE-PATH]/xtest/tests/postman",
"suiteId": "regression"
}
Usage
$ ./xRunner.js
__________________________________________________________________________________________________________________________________
xRunner Ver. 1.0.0
__________________________________________________________________________________________________________________________________
USAGE: $ ./xRunner.js <program-command> [--settingsKey settingsValue]
<program-command> - Required. Valid program-command values are:
g[et] - GET a list of Postman collections within the given suiteId.
a[ll] - Run ALL Postman collections within the given suiteId.
<collectionList> - Run one or more Postman collections within the given suiteId by providing a
csv list of COLLECTION NAMEs.
--settingsKey settingsValue - Optional. Any number of settings overrides.
__________________________________________________________________________________________________________________________________
Configurations
All available configurations with documentation and defaults can be viewed here: https://github.com/schwabyio/xrunner/lib/config.js
Configuration Order of Precedence (lowest to highest): 1. Default value 2. Local settings.json override 3. Environment variables override 4. Command line argument override
1.1.0
2 years ago