Page History
...
Xray JSON format | /rest/raven/1.0/import/execution |
Cucumber JSON output format | /rest/raven/1.0/import/execution/cucumber |
Cucumber JSON output format multipart | /rest/raven/1.0/import/execution/cucumber/multipart |
Behave JSON output format | /rest/raven/1.0/import/execution/behave |
Behave JSON output format multipart | /rest/raven/1.0/import/execution/behave/multipart |
JUnit XML output format | /rest/raven/1.0/import/execution/junit |
Junit JUnit XML output format multipart | /rest/raven/1.0/import/execution/junit/multipart |
TestNG XML output format | /rest/raven/1.0/import/execution/testng |
TestNG XML output format multipart | /rest/raven/1.0/import/execution/testng/multipart |
NUnit XML output format | /rest/raven/1.0/import/execution/nunit |
NUnit XML output format multipart | /rest/raven/1.0/import/execution/nunit/multipart |
Robot Framework XML output format | /rest/raven/1.0/import/execution/robot |
Robot Framework XML output format multipart | /rest/raven/1.0/import/execution/robot/multipart |
Compressed .zip file (e.g., Calabash execution results) | /rest/raven/1.0/import/execution/bundle |
...
Expand | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||
|
...
Xray provides another endpoint if you want to create new Test Executions and have control over newly-created Test Execution fields. It allows you to send two JSON files, the normal Cucumber result JSON and a JSON similar to the one Jira uses to create new issues. For more information about that second format, check the Jira documentation here.
Expand | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||
|
...
Xray provides another endpoint if you want to create new Test Executions and have control over newly-created Test Execution fields. It allows you to send two JSON files, the normal Behave's result JSON and a JSON similar to the one Jira uses to create new issues. For more information about that second format, check the Jira documentation here.
Expand | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
...
Expand | |||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||
|
...
Xray provides another endpoint if you want to create new Test Executions and have control over newly-created Test Execution fields. It allows you to send one XML file (the JUnit report) and a JSON similar to the one Jira uses to create new issues. For more information about that second format, check the Jira documentation here.
Expand | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
...
TestNG XML results
After executing NUnit TestNG tests, you must import the outputted XML execution results to Jira using the following endpoint:
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||
|
TestNG XML results Multipart
Xray provides another endpoint if you want to create new Test Executions and have control over newly-created Test Execution fields. It allows you to send one XML file (the TestNG report) and a JSON similar to the one Jira uses to create new issues. For more information about that second format, check the Jira documentation here.
Expand | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
|
NUnit XML results
After executing NUnit tests, you must import the outputted XML execution results to Jira using the following endpoint:
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
...
Xray provides another endpoint if you want to create new Test Executions and have control over newly-created Test Execution fields. It allows you to send one XML file (the NUnit report) and a JSON similar to the one Jira uses to create new issues. For more information about that second format, check the Jira documentation here.
Expand | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
Robot Framework XML results
After executing Robot Framework tests, you must import the output XML execution results to Jira using the following endpoint:
|
Robot Framework XML results
After executing Robot Framework tests, you must import the output XML execution results to Jira using the following endpoint:
Expand | |||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Expand | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Responses200 OK : application/json : Successful. The results where successfully imported to Jira.
400 BAD_REQUEST : application/json : Returns the error. 401 UNAUTHORIZED : application/json : The Xray license is not valid. 500 INTERNAL SERVER ERROR : application/json : An internal error occurred when importing execution results. |
Robot Framework XML results Multipart
Xray provides another endpoint if you want to create new Test Executions and have control over newly-created Test Execution fields. It allows you to send one XML file (the Robot report) and a JSON similar to the one Jira uses to create new issues. For more information about that second format, check the Jira documentation here.
Expand | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||
|
Robot Framework XML results Multipart
Xray provides another endpoint if you want to create new Test Executions and have control over newly-created Test Execution fields. It allows you to send one XML file (the Robot report) and a JSON similar to the one Jira uses to create new issues. For more information about that second format, check the Jira documentation here.
Expand | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||
|
Multiple Execution Results
In order to import multiple execution results (e.g., outputted from Calabash or Xamarin Test Cloud), you must import the bundled compressed file with multiple execution results to Jira using the following endpoint:
Expand | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
|
Multiple Execution Results
In order to import multiple execution results (e.g., outputted from Calabash or Xamarin Test Cloud), you must import the bundled compressed file with multiple execution results to Jira using the following endpoint:
...
title | POST /rest/raven/1.0/import/execution/bundle |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Import the execution results created with the Cucumber JSON output formatter. For more information, please check the Cucumber reports documentation.
Request
multipart/form-data:
"filePart" : a MultipartFormParam containing a compressed zip file to import or a JSON file to import.
Tip | ||
---|---|---|
| ||
curl -H "Content-Type: multipart/form-data" -u admin:admin -F "file=@cucumber_results.zip" http://yourserver/rest/raven/1.0/import/execution/bundle |
Responses
200 OK : application/json : Successful. The results where successfully imported to Jira.
Code Block | ||
---|---|---|
| ||
{
"testExecIssue": {
"id": "10000",
"key": "DEMO-123",
"self": "http://www.example.com/jira/rest/api/2/issue/10000"
}
} |
400 BAD_REQUEST : application/json : No execution results where provided.
401 UNAUTHORIZED : application/json : The Xray license is not valid.
How results are mapped to Test entities
Whenever importing results from some frameworks (i.e. JUnit, TestNG, NUnit, Robot framework), Xray can identify the automated test from the report/results file, based on an hardcoded criteria (such as the class name plus the class method corresponding to the automated test). However, depending on the test automation framework, it's possible to specify the Test issue key to which report the results in the test's code.
Independently of whether the test is identified implicitly (based on some attributes present in the test result file) or explicitly (based on the provided Test key), related Test Runs are always reported against the correct Test issue. As a consequence, if you report results multiple times there won't be duplicated Test entities.
When the identification is implicit, Xray is able to create (Generic) Test entities, if needed, per each automated test; these will be reused afterwards in similar cases.
Whenever processing results from a automation framework, for each automated test result,
- If the Test key is provided and...
- it exists, then create a Test Run for that Test
- it doesn't exist, then don't create any Test Run (since for some reason the explicitly identified Test does not exist)
- if no Test key is provided...
- try to find a Test in the identified project with the same Generic Test Definition (e.g. with the same class name+class method for example)
- if it exists, then create a Test Run for that Test
- if it doesn't exist, then search for a Test with the same Generic Test Definition in all JIRA projects
- if it exists, then create a Test Run for that Test
- it doesn't exist, then create a Test in the identified project (based on the project's key or the project associated with the provided test execution key)
- try to find a Test in the identified project with the same Generic Test Definition (e.g. with the same class name+class method for example)
For some frameworks, including Cucumber and Behave, Tests must exist previously to the submission of results related to them.
The reason for it,resides mainly in the fact that is not possible to create the complete Test specification from the results file.
...