Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Issue with XRAY execution results import


We are trying to import execution result into a Test Execution issue type in Jira Server (Native) in the JUnit XML format following REST API instructions in


We have triggered the below API call:

curl -H "Content-Type: multipart/form-data"  -H "Authorization: Bearer <input-token-here>" -F "file=@junit.xml" http://localhost:8080/rest/raven/1.0/import/execution/junit?testExecKey=XP-8


We get back response as below:



But after opening the XP-8 Test Execution issue, we do not find any test record created related to the XML import. [In Xray cloud we have successfully tested out the execution result import using its corresponding REST API.]


Below are the contents from the junit.xml file:

<testsuite xmlns:xsi="" xsi:noNamespaceSchemaLocation="" name="DefaultResultName" time="37.321" tests="2" skipped="0" errors="0" failures="0">
<testsuite name="Validate Service" time="6.143" tests="2" skipped="0" errors="0" failures="0">
<testcase name="Simple test for addition" time="2.083"/>
<testcase name="Simple test for subtraction" time="0.221"/>


If you could let us know if we are missing any step or in which location on the UI should we check for the result imported.

1 answer

0 votes
Stefan Salzl Community Leader Sep 01, 2022

Hi @Anuraag K B ,

As I could see in the documentation the "multipart" import expects additional JSON files. Honestly I´m not familiar with multipart import so far but did several imports of JUnit-xml.

As far as your description looks like you are trying to import result-xml. Could you try to use the xml-endpoint:



Thank you @Stefan Salzl for your response. I do not face any issue when importing JUnit XML to Xray cloud.. but there seems to be an issue with native Jira wherein the report isn't getting uploaded and I do not get any error message as well. Is there any place where I can report the issue.. (also am using localhost.. not sure if that would be issue)

Stefan Salzl Community Leader Sep 06, 2022

ah ok. I see. As the documentation says the API call needs your server:

Example Request

curl -H "Content-Type: multipart/form-data" -u admin:admin -F "file=@report.xml" -F "info=@testExec.json" -F "testInfo=@test.json" http://yourserver/rest/raven/1.0/import/execution/junit/multipart


Please give it a shot and let me know if this helps.


Hi @Stefan Salzl 

Seems like the Import Execution Results feature of XRay isn't working from the UI as well in the Jira on-premise server.

Am using the version Jira v9.2.0


As in below screenshot am trying to import the Execution Result via the Import Execution Results option from the Test Execution issue type but the tests do not get added post the junit xml file import.


Stefan Salzl Community Leader Sep 23, 2022

Hi @Anuraag K B 

did you also try to import via the „More“ button in the issue as describe in the documentation?


Do you get any error message after import?

Which tool do you use for test automation? Where are the results generated?

Is it possible to see the xml?


Unfortantely I don‘t have any xray environment at the moment to verify/try out :(


Hi @Stefan Salzl 

Yeah I have tried uploading the file via the Import Execution Reults from "More" button as well but the result remains the same - response code is 200.

I will attach the XML file here. The same file gets uploaded successfully in the cloud Jira/Xray.


XML content:




Stefan Salzl Community Leader Sep 26, 2022

Hi @Anuraag K B 

it seems your call is missing the method (POST). This is a call I used  succeessfully in the past:

curl -H "Content-Type: text/xml" -X POST \
-H "Authorization: Bearer ${{ secrets.XRAY_TOKEN }}" \
--data @"./cypress/test-results.xml"${key}



Suggest an answer

Log in or Sign up to answer

Atlassian Community Events