Search code examples
junitjirajira-rest-apijira-xray

Jira Xray missing Results Output


I am currently exporting my jUnit test results to Xray via REST API V2. All is fine and as expected, except when a test fails there is no error logged, the Output field is blank: Missing output

I am importing the jUnit xml file after running Android tests. I have not modified it. It's a typical jUnit xml file. Is there an additional step required in order to get the error message to display in the execution details ticket?

Thanks in advance.


Solution

  • The JUnit XML is a "de facto standard" but there is no accurate specification for it. Different frameworks may produce slightly different XML reports. In Xray for Jira server/DC, how Xray processes the JUnit XMl report is described, at least to a certain point, here. There may be some limitations though. One of them is related to the "message" attribute on the element; as of v4.x, is is not processed as detailed here. On the concrete problem you reported, that seems to be related to the presence of "type" attribute, that is currently required. I see two ways moving forward:

    • add the "type" on the element; this may require you to implement it on the test runner/framework that generates it. This will be a more straighforward approach; if you're using an open-source testing framework, you can try to support it or ask the open-source community of that project to provide support for it
    • or handle it on Xray side.. I would recommend you to reach Xray team and open a support ticket, as this may be an improvement that needs to be supported (it will need to be analyzed).