Parsing json result generated by cucumber and push results to TestRail
npm install jayrepo/cucumber-testrail
Add tags to your feature/scenario with syntax @_C<test_rail_case_id>
. e.g. @_C12345
.
The deault prefix for test case is _C
, it can be overrided with prefix
option
const pushResult = require('cucumber-testrail')
pushResult({
source: './result.json', // (Required) path to json result file of cucumber
url: 'https://yourproject.testrail.com/', // (Required) base url of testrail
projectId: 31, // (Required) project id
suiteId: 2271, // (Required) test suite id
user: process.env.TR_USER // (Required) your test rail id
token: process.env.TR_TOKEN // (Required) your test rail token
prefix: '_C', // (Optional) default value is `_C`,
passId: 7, // (Optional) default value is `1`,
failId: 5, // (Optional) default value is `5`,
}).then(console.log)