A lot of tools produces and consumes the same XML File format for Unit Test report.
Example (source):
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="0" failures="0" hostname="hazelnut.osuosl.org" name="net.cars.engine.MoteurTest" tests="6" time="0.021" timestamp="2007-11-02T23:13:50">
<properties>
<property name="java.vendor" value="IBM Corporation" />
<property name="os.name" value="Linux" />
<!-- more property tags-->
</properties>
<testcase classname="net.cars.engine.MoteurTest" name="hasBougie" time="0.0010" />
<testcase classname="net.cars.engine.MoteurTest" name="hasCarburatueur" time="0.0010" />
<!-- more testcase tags-->
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
After a little bit research, I have found that the format was proposed by the apache foundation (by the ant project).
Produced by:
Consumed by:
The only document I could find is this page on the ant wiki: Proposals/EnhancedTestReports
Is there any specification of this format (DTD, XSD) ?
I want to write a such file from hand... (or maybe use a librairy if you know any)...
Junit xml format is used in many java applications, basically, this framework was used by the unit test framework. The junit test will generate a simple report of xml files and create the test execution.
An XSD defines the structure of an XML document. It specifies the elements and attributes that can appear in an XML document and the type of data these elements and attributes can contain. This information is used to verify that each element or attribute in an XML document adheres to its description.
XML documents are used for data interchange between different applications, web application create (X)HTML output or respond to AJAX requests using little XML snippets. There are many use cases where XML is generated and the outputs have to be tested as much as any other part of the application.
1.1 The Schema Namespace ( xs ) The XML representation of schema components uses a vocabulary identified by the namespace name http://www.w3.org/2001/XMLSchema . For brevity, the text and examples in this specification use the prefix xs: to stand for this namespace; in practice, any prefix can be used.
This page http://windyroad.org/2011/02/07/apache-ant-junit-xml-schema/ suggests that the XML Schema for JUnit test reports is here http://windyroad.org/dl/Open%20Source/JUnit.xsd
The structure of that schema seems to match the example you have given.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With