Xray - xunit xml report - import of execution results is giving error

Anshika February 8, 2021

Hello, 

Can someone please help me with the import of xml result to Xray.

I have created a test as 'generic' and in definition I have kept the method path: 

example: ZobiTest.LoginTest.MainFocusAccountSelectorContainsFocusAccount

Now I am using the following XML :

<?xml version="1.0" encoding="utf-8"?>
<assemblies timestamp="12/23/2020 14:48:52">
<assembly name="filepath\ZobiTest.dll" run-date="2020-12-23" run-time="14:48:52" total="1" passed="1" failed="0" skipped="0" time="18.787" errors="0">
<errors />
<collection total="1" passed="1" failed="0" skipped="0" name="Test collection for ZobiTest.LoginTest" time="18.787">
<test name="ZobiTest.LoginTest.MainFocusAccountSelectorContainsFocusAccount" type="ZobiTest.LoginTest" method="MainFocusAccountSelectorContainsFocusAccount" time="18.7867010" result="Pass">
<traits>
<trait name="test" value="TP-79" />
</traits>
</test>
</collection>
</assembly>
</assemblies>

I am getting following error message:

Error importing execution results to database:

Error parsing results file

1 answer

0 votes
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2021

Hi @Anshika 

I have imported your XML successfully.

Please check that you are using at least version 4.2.0 of Xray or later and that you are executing the correct endpoint (https://docs.getxray.app/display/XRAY/Import+Execution+Results+-+REST#ImportExecutionResultsREST-xUnitXMLresults).

In case you need additional help, please contact the Xray Support (http://xraysupport.xpand-it.com) to investigate further.

Kind regards,
Rogério Paiva [Xray Support Team]

Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2021

@Anshika P.S.: It is best to remove the element "<trait name="test" value="TP-79" />" and let Xray automatically create the Test case. The Test case matching is done by the text found in the Test Definition, and if the text does not exactly match, it fails to upload correctly.

Anshika February 10, 2021

Thank you, we have moved to JSON and it is working for us. 

I am happy for this request to close.

Suggest an answer

Log in or Sign up to answer