Ant + JUnit4
JUnit XML as written by Ant’s junit task running JUnit 4 tests.
Read by pyEDAA.Reports.Unittesting.JUnit.AntJUnit4.Document - see Ant + JUnit4.
Download
Ant-JUnit4.xsd (4.8 kiB)
Validate a report
xmllint --schema Ant-JUnit4.xsd --noout report.xml
Source
1<?xml version="1.0" encoding="utf-8" ?>
2<xsd:schema
3 version="0.1"
4 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
5 <xsd:annotation>
6 <xsd:documentation xml:lang="en">Reversed engineered schema description for JUnit-like unit test summary files.</xsd:documentation>
7 </xsd:annotation>
8
9 <xsd:simpleType name="preservingstring">
10 <xsd:restriction base="xsd:string">
11 <xsd:whiteSpace value="preserve"/>
12 </xsd:restriction>
13 </xsd:simpleType>
14
15 <xsd:complexType name="literalblock">
16 <xsd:simpleContent>
17 <xsd:extension base="preservingstring">
18 <xsd:attribute name="type" type="xsd:string" />
19 <xsd:attribute name="message" type="xsd:string" />
20 </xsd:extension>
21 </xsd:simpleContent>
22 </xsd:complexType>
23
24 <xsd:complexType name="property">
25 <xsd:simpleContent>
26 <xsd:extension base="preservingstring">
27 <xsd:attribute name="name" type="xsd:string" />
28 <xsd:attribute name="value" type="xsd:string" />
29 </xsd:extension>
30 </xsd:simpleContent>
31 </xsd:complexType>
32
33 <xsd:complexType name="properties">
34 <xsd:sequence>
35 <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
36 </xsd:sequence>
37 </xsd:complexType>
38
39 <xsd:complexType name="testcase">
40 <xsd:sequence minOccurs="0">
41 <xsd:element name="properties" type="properties" minOccurs="0" maxOccurs="1">
42 <xsd:annotation>
43 <xsd:documentation xml:lang="en">Describes the result of an individual testcase.</xsd:documentation>
44 </xsd:annotation>
45 </xsd:element>
46 <xsd:choice minOccurs="0">
47 <xsd:element name="skipped" type="literalblock" minOccurs="0">
48 <xsd:annotation>
49 <xsd:documentation xml:lang="en"></xsd:documentation>
50 </xsd:annotation>
51 </xsd:element>
52 <xsd:element name="error" type="literalblock" minOccurs="0">
53 <xsd:annotation>
54 <xsd:documentation xml:lang="en"></xsd:documentation>
55 </xsd:annotation>
56 </xsd:element>
57 <xsd:element name="failure" type="literalblock" minOccurs="0">
58 <xsd:annotation>
59 <xsd:documentation xml:lang="en"></xsd:documentation>
60 </xsd:annotation>
61 </xsd:element>
62 </xsd:choice>
63 <xsd:element name="system-out" type="literalblock" minOccurs="0">
64 <xsd:annotation>
65 <xsd:documentation xml:lang="en"></xsd:documentation>
66 </xsd:annotation>
67 </xsd:element>
68 <xsd:element name="system-err" type="literalblock" minOccurs="0">
69 <xsd:annotation>
70 <xsd:documentation xml:lang="en"></xsd:documentation>
71 </xsd:annotation>
72 </xsd:element>
73 </xsd:sequence>
74 <xsd:attribute name="name" type="xsd:string" use="required" />
75 <xsd:attribute name="classname" type="xsd:string" use="required" />
76 <xsd:attribute name="time" type="xsd:float" use="optional" />
77 <xsd:attribute name="assertions" type="xsd:nonNegativeInteger" use="optional" />
78 <xsd:attribute name="file" type="xsd:string" use="optional" />
79 <xsd:attribute name="line" type="xsd:nonNegativeInteger" use="optional" />
80 </xsd:complexType>
81
82 <xsd:complexType name="testsuite">
83 <xsd:sequence minOccurs="0" maxOccurs="unbounded">
84 <xsd:element name="properties" type="properties" minOccurs="0" maxOccurs="1">
85 <xsd:annotation>
86 <xsd:documentation xml:lang="en">Describes the result of an individual testcase.</xsd:documentation>
87 </xsd:annotation>
88 </xsd:element>
89 <xsd:element name="testcase" type="testcase" minOccurs="0" maxOccurs="unbounded">
90 <xsd:annotation>
91 <xsd:documentation xml:lang="en">Describes the result of an individual testcase.</xsd:documentation>
92 </xsd:annotation>
93 </xsd:element>
94 <xsd:element name="system-out" type="literalblock" minOccurs="0">
95 <xsd:annotation>
96 <xsd:documentation xml:lang="en"></xsd:documentation>
97 </xsd:annotation>
98 </xsd:element>
99 <xsd:element name="system-err" type="literalblock" minOccurs="0">
100 <xsd:annotation>
101 <xsd:documentation xml:lang="en"></xsd:documentation>
102 </xsd:annotation>
103 </xsd:element>
104 </xsd:sequence>
105 <xsd:attribute name="name" type="xsd:string" use="required" />
106 <xsd:attribute name="errors" type="xsd:nonNegativeInteger" use="optional" />
107 <xsd:attribute name="failures" type="xsd:nonNegativeInteger" use="optional" />
108 <xsd:attribute name="skipped" type="xsd:nonNegativeInteger" use="optional" />
109 <xsd:attribute name="tests" type="xsd:nonNegativeInteger" use="optional" />
110 <xsd:attribute name="assertions" type="xsd:nonNegativeInteger" use="optional" />
111 <xsd:attribute name="time" type="xsd:float" use="optional" />
112 <xsd:attribute name="timestamp" type="xsd:dateTime" use="optional" />
113 <xsd:attribute name="hostname" type="xsd:string" use="optional" />
114 <xsd:attribute name="file" type="xsd:string" use="optional" />
115 </xsd:complexType>
116
117 <xsd:element name="testsuite" type="testsuite">
118 <xsd:annotation>
119 <xsd:documentation xml:lang="en">Describes the overall result of all testcases in a single testsuite.</xsd:documentation>
120 </xsd:annotation>
121 </xsd:element>
122</xsd:schema>