Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

XRAY Cloud Post unit test results in JUnit format to attach to test plan (DTPE) fails

Wayne February 1, 2023

I am trying to post unit test results that I have obtained using CMake v 3.21.4 using the --output-junit option. This produces the test results, snipped extract below:

JUnit_output1.JPG

JUnit_output2.JPG

Using https://xray.cloud.getxray.app/api/v1/import/execution/junit/multipart it fails. The response contains the following.

{'fields': {'description': 'Test plan : DTPE-82019\n', 'issuetype': {'name': 'Test Execution'},
'labels': ['test_label'], 'project': {'key': 'DTPE'}, 'xrayFields': {'testPlanKey': 'DTPE-82019'}}

('results', <_io.BufferedReader name='<file path>/component_ut_results.xml'>)]

Error in importing results : {"error":"Error creating Test - Project with key DTPE doesn't contain the issue type Test."}

The DTPE project type includes issue Test Plan, Test, and Test Execution. The Test Execution is created and linked to the Test Plan given as a parameter.

If I use non-multipart https://xray.cloud.getxray.app/api/v1/import/execution/junit I get a different error saying missing data in the results, but I don't know what is required:

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

Any idea how to resolve this? [Thanks in advance for any help] 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events