@rd-testrail-reporter/wdio
v7.1.2
Published
Web Driver IO reporter for Testrail.
Downloads
4
Readme
Table of Contents
Installation
npm install @rd-testrail-reporter/core @rd-testrail-reporter/wdio
Usage
Set the required environment variables TESTRAIL_API_USERNAME
and TESTRAIL_API_PASSWORD
. This can be done quite easily using a library like doenv. A .env
file might look like this for example:
TESTRAIL_API_USERNAME="<your-username>"
TESTRAIL_API_PASSWORD="<your-password>"
In your wdio.conf
file specify the reporter and options like:
import WDIOTestrailReporter from '@rd-testrail-reporter/wdio';
// ...
reporters: [
[WDIOTestrailReporter, {domain: '<your-domain>', projectID: 0}]
]
// ...
In order to configure the reporter before Workers are spawned we need to call the start
static method in the onPrepare
callback in the wdio.conf
file.
// ...
onPrepare: function (config) {
WDIOTestrailReporter.start(config);
}
// ...
Cleanup
Cleaning up is just as simple as the start up, we simply need to call the end
static method in the onComplete
callback in the wdio.conf
file.
onComplete: function() {
WDIOTestrailreporter.end();
}
The start
and end
methods correlate to the start and end of a test run in Testrail and as such are essential.