[XRAY-JIRA][CLOUD] Importing Xray JSON report from external source but unable to view the results

shriya January 6, 2025

Hello Team,

 

I need to import XRAY JSON report (data.json) to Test execution in Xray Jira issue. But unable to view the results in XRAY-JIRA for that particular key.

I see "Summary" and "Description" are getting updated but not test results.

Curl command used

curl -H "Content-Type: application/json" -X POST -H "Authorization: Bearer $token" --data @"data.json" https://xray.cloud.getxray.app/api/v2/import/execution

Output

curl -H "Content-Type: application/json" -X POST -H "Authorization: Bearer $token" --data @"data.json" https://xray.cloud.getxray.app/api/v2/import/execution {"id":"10515","key":"xyz-244","self":"https://xyz.atlassian.net/rest/api/2/issue/10515"}

Kindly let me know how to see updated results for every test belonging the test execution.

data.json sample -

 cat data.json

{

    "testExecutionKey": "KERNELPROT-244",

     "info": {

                   "summary": "Execution of automated tests for release",

                   "description": "This execution is automatically created when importing execution results from an external source",

                   "startDate": "2025-01-07T11:58:48Z",

                   "finishDate": "2025-01-07T11:58:48Z" },

                    "tests": [

                                  {

                                     "testKey": "KERNELPROT-236",

                                      "start": "2025-01-07T11:58:48Z",

                                      "finish": "2025-01-07T11:58:48Z",

                                    "comment": "Successful execution",

                                     "status": "PASS"

                                }, {

                                     "testKey": "KERNELPROT-231",

                                      "start": "2025-01-07T11:58:48Z",

                                       "finish": "2025-01-07T11:58:48Z",

                                       "comment": "Successful execution",

                                        "status": "PASS"

                                 }

                              ]

                  }

 

Thanks,

Shriya

 

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Francisco Fonseca _Xray_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2025

Hi @shriya

Thank you for reaching out.

For these circumstances make sure to always reach out to our support here.

They are capable of supporting you with this.

Best, Francisco

0 votes
shriya January 9, 2025

Issue is resolved. 

Change the status from PASS to PASSED and FAIL to FAILED.

Francisco Fonseca _Xray_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2025

Great to hear that! :) 

Like shriya likes this
TAGS
AUG Leaders

Atlassian Community Events