Page History
You can manage Tests directly through the JIRA Jira REST API. Xray provides additional methods for managing Test Steps andexporting the Test definitions and test runs.
Table of Contents | ||
---|---|---|
|
Children Display |
---|
Creating and Editing Tests -
...
Jira REST API
Xray Test issues can be created and edited though the JIRA Jira REST API.
Info | ||
---|---|---|
| ||
https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Create+Issue https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Edit+issues |
All Test issue custom fields provided by Xray add-on can be modified using the JIRA Jira REST API:
- Test Type (default JIRA Jira select field)
- Cucumber Test Type (default JIRA Jira select field)
- Cucumber Scenario (default JIRA Jira text field)
- Manual Test Steps (JSON format; example below)
Info |
---|
The custom field IDs can be discovered be obtained using the JIRA Jira REST API Browser tool included in JIRAJira. Each ID is of the form "customfield_ID". Another option, which does not require JIRA Jira administration rights, can be invoking is to invoke the "Get edit issue meta" in an existing issue (e.g., in a Test issue) as mentioned here. ExExample: GET http://yourserver/rest/api/2/issue/CALC-1/editmeta |
"Manual Test Steps" custom field value format
Code Block | ||
---|---|---|
| ||
{ "fields": { "customfield_10004": { "steps": [ { "index": 0, "step": "Step 1", "data": "input Data 1", "result": "Excepted result 1" }, { "index": 1, "step": "Step 2", "data": "input Data 2", "result": "Excepted result 2" }, { "index": 2, "step": "Step 3", "data": "input Data 3", "result": "Excepted result 3" }, { "index": 3, "step": "Step 4", "data": "input Data 4", "result": "Excepted result 4" } ] } } } |
Please see next a Below is a full Test creation example using JIRAJira's REST API endpoint for creating issues.
Expand | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
...
Exporting Tests
To export tests to json JSON, you need to specify the keys, the id ID of the filter or jql JQL query of the issues you want to export, at . At least one query parameter has to be specified, but all 3 can be sent at the same time.
Expand | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
|
...
To export the test runs of a test Test, you need to specify the key of the Test you wish to export the test runs from. You can filter the Test runs by Test Environment.
Expand | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
|
...
To export the test sets of a test Test, you need to specify the key of the Test you wish to export the test sets from
Expand | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||
|
...
To export the test executions of a test Test, you need to specify the key of the Test you wish to export the test executions from
Expand | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||
|
...
To export the test plans of a test Test, you need to specify the key of the Test you wish to export the test plans from
Expand | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||
|