Skip to main content
Version: 2x

@qavajs/xray-formatter

qavajs formatter for Jira Xray

Installation​

npm install @qavajs/xray-formatter

configure formatOptions property in config file:

cloud configuration:

export default {
format: ['@qavajs/xray-formatter:report/xray.out'],
formatOptions: {
xray: {
client_id: 'client_id', // generated client_id from xray cloud
client_secret: 'client_secret', // generated client_id from xray client_secret
testExecutionKey: 'ABC-12', // test execution jira key to send result
tagRegexp: 'TEST_(.+)', // optional, parse tag regexp. default /@(.+-\d+)/
requestsPerSecond: 1 // optional, requests to Xray per second (to prevent rate limit error)
}
}
}

server configuration:

export default {
format: ['@qavajs/xray-formatter:report/xray.out'],
formatOptions: {
xray: {
endpoint: 'https://your.jira.instance/jira', //jira api endpoint
client_secret: 'client_secret', // personal access key from jira instance
testExecutionKey: 'ABC-12', // test execution jira key to send result
tagRegexp: 'TEST_(.+)', // optional, parse tag regexp
requestsPerSecond: 1 // optional, requests to Xray per second (to prevent rate limit error)
}
}
}

How it works?​

Plugin reads all tags in jira key format (@ABCD-123) or ones that matches tagRegexp and update corresponding scenarios in provided test execution

F.A.Q​

  • Does it work with Jira Server?

    Yes

  • What if multiple tests are mapped to one xray test case?

    Test will get status from last result with corresponding tag

  • What if multiple xray cases are mapped to one test?