Details
-
Story
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
-
R1.006.000 S1
-
Description
When importing execution results with the Xray REST API and the Xray JSON format, it should be possible to define any JIRA field to create/update the corresponding Test Execution issue.
For this, a new multipart endpoint shall be provided for Xray JSON. One of the parts contains the JSON content corresponding to the test runs; the other part contains the info JSON content, related with the fields of the Test Execution. The later follows the syntax of JIRA REST api for updating/creating issues.
POST /api/v1/import/execution/multipart
Content of Xray JSON part:
{ "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" }, { "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", "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" } ] } ], "defects" : [ "DEMO-10", "DEMO-11" ] } ] }
Content of info JSON part, with the fields to be set in the Test Execution:
{ "fields": { "project": { "id": "10402" }, "summary": "My Test Execution", "issuetype": { "id": "10007" }, "components" : [ { "name":"Interface" }, { "name":"Core" } ] } }