This package sends reports to the Kanoah Tests (Adaptavist) - Test Management for Jira
It works only with reports from jest
$ yarn add --dev optimaxdev/jest-tcm-reporter#masterCreate config file jest-tcm.config.js
// jest-tcm.config.js
module.exports = {
tcm: {
user: {
username: 'user',
password: 'password',
},
projectKey: 'KEY'
},
reportsFile: {
JSON: './public/reports/team-city.json'
},
api: {
host: 'https://jira.example.com/rest/kanoahtests/1.0'
},
whitelist: {
enabled: true,
checkVersion: true,
query: 'projectKey = "KEY" AND status = "Approved"',
},
}or add a config to package.json
// package.json
{
"jest-tcm": {
"tcm": {
"user": {
"username": "user",
"password": "password",
},
"projectKey": "KEY"
},
"reportsFile": {
"JSON": "./public/reports/team-city.json"
},
"api": {
"host": "https://jira.example.com/rest/kanoahtests/1.0"
},
"whitelist": {
"enabled": true,
"checkVersion": true,
"query": "projectKey = \"KEY\" AND status = \"Approved\""
}
}
}| Variable | Default Value | Description |
|---|---|---|
| cycleName | Name cycle in JTM | |
| target | Each cases separately or group by describes |
|
| testRunKey | Сycle key, if specified, results are added to the existing it | |
| updateCases | If specified, test cases' steps will be updated. |
Whitelist feature now only works for describe strategy.
Pattern for naming is: [KEY (VERSION)]
enabled- If true, only test cases in whitelist will be marked.query- Query to form whitelist (See /testrun/search in api doc).checkVersion- If true, only cases with the same version will be marked (compare with latest version of case).
Each case separately
$ npx jest-tcm-reporter --cycleName=ANT_QA-34_Mobile --target=caseGrouped by describe
$ npx jest-tcm-reporter --cycleName=ANT_QA-34_Mobile --target=describeWith updating cases
$ npx jest-tcm-reporter --cycleName=ANT_QA-34_Mobile --target=case --updateCasesAppend results are added to the existing cycle.
$ npx jest-tcm-reporter --cycleName=ANT_QA-34_Mobile --target=describe --testRunKey=ANT_C454