Xray import API creates Test Execution name that ends with several digits

Paul Harley September 6, 2018

When I import from Junit XML using the API (/rest/raven/1.0/import/junit?...) the generated Test Execution has a name like this...

Execution results - test_results.xml - [1536180193094]

Can I get more control over the name?

I definitely don't want the long string of digits, unless they have some purpose that I don't understand (-:

 

2 answers

0 votes
Patricia Petschen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 14, 2022

I was having the exact same problem.

I finally found the answer is to use what is called a multipart request.

In the section 'Xray JSON results Multipart'  from the following link there is the example I used to have some basis.
Import execution reports  
I only used the xml report as result and added a json file as info.
I tried this with Postman first to try it out and worked.
Here is the link on how to do multipart requests in postman:
Postman multipart request 

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.
September 12, 2018

Hi Paul,

Concerning the naming, it is done automatically based on the JUnit report as described in https://confluence.xpand-addons.com/display/XRAY/Taking+advantage+of+JUnit+XML+reports .

Test Cases are imported to Xray’s Generic Test issues, and the “classname” and “name” attributes are concatenated and mapped to the “Generic Test Definition” field of the Generic Test. If a Test already exists with the same “Generic Test Definition”, then it is not created again.

 

Best regards,

Xray Team

elleng November 6, 2019

What about the naming of the Test Execution (not the Test Cases)?

Could it be handled anywhere?

Michal Chmielewski September 27, 2021

Did anyone manage to find out if there is a method to control the test execution name? I cannot find an answer and wondering if it has been solved. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events