Bug 65334 - Xml Test output does not satisfy Schema
Summary: Xml Test output does not satisfy Schema
Status: REOPENED
Alias: None
Product: Ant
Classification: Unclassified
Component: AntUnit (show other bugs)
Version: 1.4
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-26 23:21 UTC by Jörn Guy Süß
Modified: 2021-05-29 09:38 UTC (History)
0 users



Attachments
a non-validating output file (38.80 KB, text/xml)
2021-05-26 23:21 UTC, Jörn Guy Süß
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörn Guy Süß 2021-05-26 23:21:30 UTC
Created attachment 37878 [details]
a non-validating output file

The output provided by the XmlFormatter test formatter does not satisfy the standard XML schema. This breaks all downstream formatters and the Eclipse view: 

https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd
Comment 1 Stefan Bodewig 2021-05-28 17:11:00 UTC
Without digging too deep into the history of XML formatted test result output: neither Ant's <junit> task nor AntUnit have ever published a schema or DTD their reports would adhere to. The schema you link is the schema for Maven's Surefire plugin.

I believe Surefire like AntUnit have used Ant's JUnit XML output as a starting point and both have extended it in different directions. For AntUnit the only goal has been to allow the <junitreport> task to work - which seems to be the case. There are some deviations from Ant's <junit> output and they have been deliberate back when AntUnit's XML output has been created. Along the lines of "how would the <junit> task output look if we were able to tweak it a bit based on what we've learned since then".

AntUnit's output is what it is and it has been like this for about fifteen years (which may or may not predate the XML schema you linked). We cannot simply change it without breaking things that use the existing format.

Therefore I'll have to close this as WONTFIX, sorry.
Comment 2 Jörn Guy Süß 2021-05-29 06:41:12 UTC
Would you accept a PR for a formatter that does work for end users?

You may be formally correct, that has never helped practical acceptance. Eclipse still counts as IDE number two in world rankings. Your decision is a decision not to help a large number of people.

Even tools that are far removed from this point, like GTest for C++ use the XML schema I have referenced.
Comment 3 Stefan Bodewig 2021-05-29 09:38:26 UTC
I didn't mean to sound the way you seem to have heard me, sorry for that.

If we are not talking about changing the existing output but rather adding an additional option, I don't see any problem with any such enhancement.