MicroFocus / ADM-FT-ToolsLauncher

Other
12 stars 8 forks source link

Support Junit 4.x format for Failure #46

Closed soleverxu closed 3 years ago

soleverxu commented 3 years ago

Tool ReportConverter

Describe the bug Customer requires that ReportConverter tool use the JUnit4.x format for his integration Zephyr tool. The closing tag is required for integration Zephyr tool. Zephyr looks for the format of Junit to publish the results using JUnit report.

Junit 4.x format for Failure: <failure message="Error!! User Exists!!" type="" > </failure>

Current in tool: <failure message="Error!! User Exists!!" type="" />

Expected behavior Support Junit 4.x format for Failure: <failure message="Error!! User Exists!!" type="" > </failure>

Additional context

Micro Focus internal ER: 608002

soleverxu commented 3 years ago

It looks like this is not a problem in the ReportConverter tool because the XML string representations <failure ... /> and <failure ...></failure> are equivalent which means that both contents are empty.

There is an interesting post that discusses this topic regarding the differences between the two representations and basically the answers say that both are equivalent. Link: https://stackoverflow.com/questions/7231902/self-closing-tags-in-xml-files

As of the ReportConverter version 1.0.20.2003, the failure content in the Junit report is always empty and the ReportConverter tool does not fill any data in that place.

Regarding the problem that Zephyr tool can't recognize the Junit report with the "<failure ... />" pattern, it could be a bug in the Zephyr tool and we may suggest the customer to ask Zephyr tool to solve that problem.

BTW, looking at the following Junit XML that is mentioned:

Junit 4.x format for Failure: <failure message="Error!! User Exists!!" type="" > </failure>

There is a whitespace before the close tag. If it is not introduced by mistake, then the meaning of the content is different - one whitespace is the valid non-empty content - which is not same as <failure ... />.

Hopefully the above information could help.

soleverxu commented 3 years ago

Not a bug.