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:
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]