Testrail Reporter Reporter
@wdio/testrail-reporter is a 3rd party package, for more information please see GitHub | npm
This reporter creates TestRail reports. The first thing you need is to enable the TestRail API so that report can communicate with TestRail and push the test results. To do so, log into your TestRail account and go to Administration > Site Settings > API and make sure you click the checkbox near Enable API.
Add TestRail's test case ID to the test description. e.g.
it("C123456 Page loads correctly", async () => {
Installβ
To use the reporter, add it to your package.json
:
npm i --save-dev @wdio/testrail-reporter
Usageβ
Add the reporter to your WDIO config file:
export const config = {
// ...
reporters:
[
['testrail', {
projectId: 1,
suiteId: 1,
domain: 'xxxxx.testrail.io',
username: process.env.TESTRAIL_USERNAME,
apiToken: process.env.TESTRAIL_API_TOKEN,
runName: 'name for the test run',
oneReport: true,
includeAll: false
}
]
],
// ...
}
Optionsβ
projectId
β
ID of the testrail project.
Type: string
suiteId
β
ID of the suite, suite 1 is default.
Type: string
domain
β
Domain of your testrail instance, e.g. your-domain.testrail.io
.
Type: string
username
β
Username of your testrail instance.
Type: string
apiToken
β
API token of your testrail instance.
Type: string
runName
β
Custom name for the test run.
Type: string
oneReport
β
Create a single test run.
Type: boolean
includeAll
β
Include all tests in suite in test run.
Type: boolean
For more information on WebdriverIO see the homepage.