External execution results from either automated and manual Tests can be imported to Jira. This operation may be done in one of two ways:
- Manually, using the Import Execution Results action accessible from the Test Execution issue screen
- via the REST API to integrate with Continuous Integration (CI) platforms or other external execution processes. Please refer to the Xray REST API.
Supported Import Formats
Xray supports the following formats for importing execution results:
- Cucumber JSON output format
- JUnit XML output format
- NUnit XML output format
- Xray JSON format
Cucumber JSON output format
The Cucumber tool is capable of generating multiple reports for an execution. In order to import the execution results to Xray, Cucumber must generate a JSON output (example here) using the following arguments:
JUnit XML output format
Xray supports a JUnit XML format for importing execution results.
NUnit v3.0 XML output format
Xray supports an NUnit v3.0 XML format for importing execution results.
NUnit v2.6 XML output format
Xray supports an NUnit v2.6 XML format for importing execution results.
Xray JSON format
Xray also supports a custom and generic format for importing execution results. This allows you to import any execution result as long as it is in JSON format. This way, you can import any execution result to Jira, either from automated or manual Tests.
Importing Execution Evidences
Creating new Test Execution issues
The info object allows you to specify specific execution information when creating new Test Execution issues.
Importing results to Manual Tests
You can import manual Test execution results using the steps element for specifying the Test step results.
The JSON results file must follow this schema:
Example 1: Automated Tests
This is an example of a JSON file with execution results that will update Automated Tests in Jira. The last item DEMO-9 must be a Cucumber Test because the results contain examples.
Example 2: Manual Tests
This is an example of a JSON file with execution results that will update a Manual Test in Jira.
Example 3: Generic Test
This is an example of a JSON file with execution results that will update a Generic Test in Jira.
Importing Multiple Execution results
Xray supports importing multiple results for the same Test issues in the same execution. These results often indicate different contexts/environments where the same Test must be executed. Xray will group all executions of the same Test in a single Test Run and present all execution information, including the different contexts in the Execution page.
When importing execution results using the Cucumber JSON output formatter, multiple executions for the same scenario/Test issue will be merged into a single Test Run.
When importing execution results using the Xray JSON format, the results JSON element must contain all execution results for the same Test Run.
Xamarin Test Cloud
If you are using the Xamarin Test Cloud for executing Cucumber mobile Tests in different combinations of mobile devices and operating systems, you can import the results to Jira by making a compressed zip file containing the multiple Cucumber JSON files.