##Release Tasks
a custom task to connect to Xray Test Management for Jira then publish Test Results
1- define a service connection:
Endpoint used to import Test results in the Xray JSON format.

2- add publish to Jira XRAY task to your pipeline:
Updating an existing Test Run using Xray format will reset all dataset related fields. This means that all current iteration data and dataset present in the Test Run will be replaced with the new information given in the publish task.

Jira Xray Json Import Execution Schema
Import Execution Results - Xray JSON format
Example:
{
"info": {
"project" : "DEMO",
"summary": "Execution of automated tests for release v1.3",
"description": "This execution is automatically created when importing execution results from an external source",
"version": "v1.3",
"user": "admin",
"revision": "1.0.42134",
"startDate": "2014-08-30T11:47:35+01:00",
"finishDate": "2014-08-30T11:53:00+01:00",
"testPlanKey": "DEMO-100",
"testEnvironments": [
"iOS",
"Android"
]
},
"tests": [
{
"testKey": "DEMO-6",
"start": "2014-08-30T11:47:35+01:00",
"finish": "2014-08-30T11:50:56+01:00",
"comment": "Successful execution",
"status": "PASS",
"testVersion": "v3.0"
},
{
"testKey": "DEMO-7",
"start": "2014-08-30T11:51:00+01:00",
"finish": "2014-08-30T11:52:30+01:00",
"comment": "Execution failed. Example #5 FAIL.",
"status": "FAIL",
"testVersion": "v3.0",
"customFields": [
{
"id": 321,
"value": [
"option A",
"option B"
]
}
],
"evidences": [
{
"data": "iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(...base64 file enconding)",
"filename": "image21.jpg",
"contentType": "image/jpeg"
}
],
"examples": [
"PASS",
"PASS",
"PASS",
"PASS",
"FAIL"
],
"steps": [
{
"status": "PASS",
"comment": "Coment on Test Step Result 1",
"evidences": [
{
"data": "iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(...base64 file enconding)",
"filename": "image22.jpg",
"contentType": "image/jpeg"
}
],
"actualResult": "Actual result on Test Step 1"
}
],
"defects": [
"DEMO-10",
"DEMO-11"
]
}
]
}
##Tasks Include
##Release Notes
This extension has been tested with XRAY Jira Server On-premis.
This extension has not been tested with XRAY Test Management for Jira Cloud.