Closed adicusar-lh closed 1 year ago
From a JUnit XML format point of view (more XML encoding actually), the current encoding is correct. It produces something like the following:
<property name="test_summary" value="Error "Login or/and password are incorrect""/>
The standard/built-in JUnit legacy reporter that comes with Junit5 works in the same way. Therefore, the problem is ahead, namely on Xray cloud endpoint. Having said, I would advise reaching out Xray support team and give an example of the Junit XML file you're trying to import. I took already the opportunity to raise a bug internally
Thank you for reply and for raising the bug. I will close the issue so it could be useful for others if they find themselves in the same situation.
When JUnit 5 test is annotated with
@DisplayName
and it looks like@DisplayName("Error \"Login or/and password are incorrect\"")
(double quotes are escaped with backslash) then after extended JUnit report is generated (with test_summary property having that value) on the import we will get{"error":"Invalid JQL query"}
In Extended XML report
"
is present which later breaks JQLTo upload results to XRay I have used https://github.com/mikepenz/xray-action To fix it I have used single quotes in the @DisplayName annotation