README
junit-testrail-reporter
This package has been archived in favor of
jest-testrail-reporter
You've got some test cases in TestRail that are automated via Jest. This will report the results as a run in TestRail.
Installation
Begin by install the package as a dependency
npm i jest-testrail-reporter
Usage
Add the reporter to the
reporters
array in your jest config, e.g.jest.config.js
module.exports = { reporters: [ 'default', [ 'jest-testrail-reporter', { host: YOUR_TESTRAIL_HOST, password: YOUR_TESTRAIL_ACCOUNT_PASSWORD, projectId: YOUR_TESTRAIL_PROJECT_ID, suiteId: YOUR_TESTRAIL_SUITE_ID, username: YOUR_TESTRAIL_USERNAME, }, ], ], };
Add the test case identifier in the title of your test:
... it('C123456 given some scenario when an action is taken then something is true', () => {}) test('C654321 given some scenario when an action is taken then something is true', () => {}) // multiple test cases are supported as well test('C123456 C654321 C678901 given some scenario when an action is taken then something is true', () => {}) ...
Run your tests
Configuration
Property | Description | Required | Default |
---|---|---|---|
host |
The host of the TestRail server to send results to. | ✔️ | - |
password |
The password, of the user, used to authenticate with TestRail. | ✔️ | - |
projectId |
The identifier of the TestRail project to send results to. | ✔️ | - |
runName |
A brief description used to identify the automated test run. | ❌ | "Automated Test Run via jest-testrail-reporter" |
suiteId |
The identifier of the TestRail suite to classify results under. | ✔️ | - |
username |
The username of the account to authenticate with TestRail. | ✔️ | - |