Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can i find the DTD or XML Schema of surefire generated XML (TEST-<testname>.xml) file?

Where can i find the DTD or XML Schema of surefire generated XML (TEST-.xml) file?

like image 652
Sudhir Avatar asked Jul 29 '10 12:07

Sudhir


2 Answers

I think that Maven is using the XML result format "owned" by Ant and I am not sure there is an official DTD or Schema. From JUnit 4 XML schematized? on the JUnit-user list:

There's a pretty standard format for JUnit XML output. You've probably seen it: there's a <testsuite> root element containing zero-or-more <testcase> elements, each of which may contain a <failure> or <error> element. (There's also a <properties> element with zero-or-more <property> elements.) A lot of tools know how to read this format and report on it, including at least Ant, Maven, Cruise Control, Hudson, Bamboo, Eclipse and IntelliJ IDEA.

Is this XML standardized anywhere in a DTD or XML Schema or something?

If there isn't a standard, could we go about making a standard and blessing it? (Perhaps JUnit 4.5 could include an XMLReporter that could be a reference implementation.)

In particular, I'm curious to know how one would represent that a test has been ignored in "standard" JUnit XML.

I never found such a "standard". And imo it is a good idea as you may enhance the report by using your own information and still have the tools working. But if you go with a DTD/schema and validation then this will stop working.

See also

  • JUnit 4 XML schematized? on the JUnit-user list
  • schema for junit xml output on the ant-dev list

Related questions

  • Does anyone know where to get the XSD file describing the junitReport.xml file format expected by Hudson?
  • Spec. for JUnit XML Output
like image 109
Pascal Thivent Avatar answered Sep 30 '22 11:09

Pascal Thivent


I know this question is 6 years old, but just for future readers...

Actually there is an official schema for surefire generated XML - it can be found here: surefire-test-report.xsd.

like image 45
G. Demecki Avatar answered Sep 30 '22 13:09

G. Demecki