Catch2 JUnit
JUnit XML as written by Catch2’s JUnit reporter (--reporter JUnit).
Read by pyEDAA.Reports.Unittesting.JUnit.Catch2JUnit.Document - see
Catch2 JUnit.
Download
Catch2-JUnit.xsd (5.4 kiB)
Validate a report
xmllint --schema Catch2-JUnit.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">
7 Schema description for the JUnit XML report written by Catch2's JUnit reporter (Catch2 v3).
8
9 Derived from the reporter's source code (src/catch2/reporters/catch_reporter_junit.cpp, Catch2 v3.16.0,
10 https://github.com/catchorg/Catch2/blob/v3.16.0/src/catch2/reporters/catch_reporter_junit.cpp) and from
11 reports written by it.
12 </xsd:documentation>
13 </xsd:annotation>
14
15 <xsd:simpleType name="preservingstring">
16 <xsd:restriction base="xsd:string">
17 <xsd:whiteSpace value="preserve"/>
18 </xsd:restriction>
19 </xsd:simpleType>
20
21 <xsd:simpleType name="duration">
22 <xsd:annotation>
23 <xsd:documentation xml:lang="en">Duration in seconds with 3 decimal places.</xsd:documentation>
24 </xsd:annotation>
25 <xsd:restriction base="xsd:decimal">
26 <xsd:pattern value="\d+\.\d{3}"/>
27 </xsd:restriction>
28 </xsd:simpleType>
29
30 <xsd:simpleType name="timestamp">
31 <xsd:annotation>
32 <xsd:documentation xml:lang="en">Start time in UTC with seconds resolution.</xsd:documentation>
33 </xsd:annotation>
34 <xsd:restriction base="xsd:dateTime">
35 <xsd:pattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z"/>
36 </xsd:restriction>
37 </xsd:simpleType>
38
39 <xsd:simpleType name="propertyName">
40 <xsd:restriction base="xsd:string">
41 <xsd:enumeration value="random-seed"/>
42 <xsd:enumeration value="filters"/>
43 </xsd:restriction>
44 </xsd:simpleType>
45
46 <xsd:simpleType name="testcaseStatus">
47 <xsd:restriction base="xsd:string">
48 <xsd:enumeration value="run"/>
49 </xsd:restriction>
50 </xsd:simpleType>
51
52 <xsd:complexType name="literalblock">
53 <xsd:simpleContent>
54 <xsd:extension base="preservingstring">
55 <xsd:attribute name="message" type="xsd:string" use="optional" />
56 <xsd:attribute name="type" type="xsd:string" use="optional" />
57 </xsd:extension>
58 </xsd:simpleContent>
59 </xsd:complexType>
60
61 <xsd:complexType name="property">
62 <xsd:attribute name="name" type="propertyName" use="required" />
63 <xsd:attribute name="value" type="xsd:string" use="required" />
64 </xsd:complexType>
65
66 <xsd:complexType name="properties">
67 <xsd:sequence>
68 <xsd:element name="property" type="property" minOccurs="0" maxOccurs="2" />
69 </xsd:sequence>
70 </xsd:complexType>
71
72 <xsd:complexType name="testcase">
73 <xsd:sequence>
74 <xsd:choice minOccurs="0">
75 <xsd:sequence>
76 <xsd:element name="skipped" type="literalblock">
77 <xsd:annotation>
78 <xsd:documentation xml:lang="en">SKIP(), or an expected failure ([!mayfail]).</xsd:documentation>
79 </xsd:annotation>
80 </xsd:element>
81 <xsd:choice minOccurs="0">
82 <xsd:element name="skipped" type="literalblock" />
83 <xsd:element name="failure" type="literalblock" />
84 <xsd:element name="error" type="literalblock" />
85 </xsd:choice>
86 </xsd:sequence>
87 <xsd:element name="failure" type="literalblock">
88 <xsd:annotation>
89 <xsd:documentation xml:lang="en">First failed assertion.</xsd:documentation>
90 </xsd:annotation>
91 </xsd:element>
92 <xsd:element name="error" type="literalblock">
93 <xsd:annotation>
94 <xsd:documentation xml:lang="en">Unexpected exception or fatal error condition.</xsd:documentation>
95 </xsd:annotation>
96 </xsd:element>
97 </xsd:choice>
98 <xsd:element name="system-out" type="literalblock" minOccurs="0" />
99 <xsd:element name="system-err" type="literalblock" minOccurs="0" />
100 </xsd:sequence>
101 <xsd:attribute name="classname" type="xsd:string" use="required" />
102 <xsd:attribute name="name" type="xsd:string" use="required" />
103 <xsd:attribute name="time" type="duration" use="required" />
104 <xsd:attribute name="status" type="testcaseStatus" use="required" />
105 </xsd:complexType>
106
107 <xsd:complexType name="testsuite">
108 <xsd:sequence>
109 <xsd:element name="properties" type="properties" minOccurs="0">
110 <xsd:annotation>
111 <xsd:documentation xml:lang="en">Written by Catch2, not by pyEDAA.Reports.</xsd:documentation>
112 </xsd:annotation>
113 </xsd:element>
114 <xsd:element name="testcase" type="testcase" minOccurs="0" maxOccurs="unbounded">
115 <xsd:annotation>
116 <xsd:documentation xml:lang="en">A test case or a path of sections.</xsd:documentation>
117 </xsd:annotation>
118 </xsd:element>
119 <xsd:element name="system-out" type="literalblock" />
120 <xsd:element name="system-err" type="literalblock" />
121 </xsd:sequence>
122 <xsd:attribute name="name" type="xsd:string" use="required" />
123 <xsd:attribute name="errors" type="xsd:nonNegativeInteger" use="required" />
124 <xsd:attribute name="failures" type="xsd:nonNegativeInteger" use="required" />
125 <xsd:attribute name="skipped" type="xsd:nonNegativeInteger" use="required" />
126 <xsd:attribute name="tests" type="xsd:nonNegativeInteger" use="required" />
127 <xsd:attribute name="hostname" type="xsd:string" use="required" />
128 <xsd:attribute name="time" type="duration" use="optional" />
129 <xsd:attribute name="timestamp" type="timestamp" use="required" />
130 </xsd:complexType>
131
132 <xsd:complexType name="testsuites">
133 <xsd:sequence>
134 <xsd:element name="testsuite" type="testsuite">
135 <xsd:annotation>
136 <xsd:documentation xml:lang="en">Describes the test run of one test executable.</xsd:documentation>
137 </xsd:annotation>
138 </xsd:element>
139 </xsd:sequence>
140 </xsd:complexType>
141
142 <xsd:element name="testsuites" type="testsuites">
143 <xsd:annotation>
144 <xsd:documentation xml:lang="en">Describes the overall result of all testcases.</xsd:documentation>
145 </xsd:annotation>
146 </xsd:element>
147</xsd:schema>