Missing data in the junit results import request while trying to import JUnit results

Sameen Javid December 31, 2019

{
"error": "Missing data in the junit results import request"
}

 

i get above error when i try to import JUNIT execution results using XRA Cloud API 

https://xray.cloud.xpand-it.com/api/v1/import/execution/junit

3 answers

0 votes
Gerard van Engelen October 23, 2020

I got this working with some help from Portal.

First you need to authenticate, You can do that using:


curl --location --request POST 'https://xray.cloud.xpand-it.com/api/v1/authenticate' \--header 'Content-Type: application/json' \--data-raw '{ "client_id": "{JiraClientID}","client_secret": "{JiraClientSecret"}'
`

After that you can use the bearer token to upload the document to jira using:

curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token" --data @"junit.xml" https://xray.cloud.xpand-it.com/api/v1/import/execution/junit?projectKey={yourProjectKey}

You can add the bearer token to the header or use Bearer authentication if you're using Postman. You can add the xml results to the body by using the raw option and just adding the resultst there.

image.png

This did it for me the response will contain the created test execution if you didn't provide any.

0 votes
yael berman January 24, 2020

Hi,
Im facing same issue.
Any updates?

0 votes
José Domingues [Xray]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 10, 2020

Hi Sameen, 

 

Can you please open a support ticket in our Portal

We'll need more information to better address the question.

 

Best Regards,

Team Xray

Suggest an answer

Log in or Sign up to answer