@frankybboy96/newman-reporter-testrail
v1.1.3
Published
TestRail reporter for Newman
Downloads
5
Maintainers
Readme
newman-reporter-testrail
TestRail reporter for Newman.
Installation
npm install newman-reporter-testrail --global
Usage
Prefix all test assertions you wish to map with the test number.
Include the letter C. You may map more than one test case to an assertion.
pm.test("C226750 C226746 Status code is 200", function () {
pm.response.to.have.status(200);
});
Export the following environment variables.
- TESTRAIL_DOMAIN TestRail domain. Do not include protocol.
- TESTRAIL_USERNAME TestRail username / email.
- TESTRAIL_APIKEY TestRail API key. To use an existing run
- TESTRAIL_RUNID Testrail run id OR Create a new run
- TESTRAIL_PROJECTID TestRail project id.
- TESTRAIL_SUITEID (optional) TestRail suite id. Mandatory in multi-suite projects. Do not use in single-suite projects.
- TESTRAIL_TITLE (optional) Title of test run to create.
You can use direnv to easily maintain directory-specific options.
You may also set some or all of these variables using bash exports.
Run newman with the reporter option
-r testrail
Example:
TESTRAIL_TITLE="Dev-API Regression" newman run my-collection.postman_collection.json -r testrail,cli