pytest JUnit
JUnit XML as written by pytest (--junitxml).
Read by pyEDAA.Reports.Unittesting.JUnit.PyTestJUnit.Document - see pyTest JUnit.
Download
PyTest-JUnit.xsd (6.3 kiB)
Validate a report
xmllint --schema PyTest-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">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:choice minOccurs="0" maxOccurs="unbounded">
64 <xsd:element name="system-out" type="literalblock" minOccurs="0">
65 <xsd:annotation>
66 <xsd:documentation xml:lang="en"></xsd:documentation>
67 </xsd:annotation>
68 </xsd:element>
69 <xsd:element name="system-err" type="literalblock" minOccurs="0">
70 <xsd:annotation>
71 <xsd:documentation xml:lang="en"></xsd:documentation>
72 </xsd:annotation>
73 </xsd:element>
74 </xsd:choice>
75 </xsd:sequence>
76 <xsd:attribute name="name" type="xsd:string" use="required" />
77 <xsd:attribute name="classname" type="xsd:string" use="required" />
78 <xsd:attribute name="time" type="xsd:float" use="optional" />
79 <xsd:attribute name="assertions" type="xsd:nonNegativeInteger" use="optional" />
80 <xsd:attribute name="file" type="xsd:string" use="optional" />
81 <xsd:attribute name="line" type="xsd:nonNegativeInteger" use="optional" />
82 </xsd:complexType>
83
84 <xsd:complexType name="testsuite">
85 <xsd:sequence minOccurs="0" maxOccurs="unbounded">
86 <xsd:element name="properties" type="properties" minOccurs="0" maxOccurs="1">
87 <xsd:annotation>
88 <xsd:documentation xml:lang="en">Describes the result of an individual testcase.</xsd:documentation>
89 </xsd:annotation>
90 </xsd:element>
91<!-- <xsd:element name="testsuite" type="testsuite" minOccurs="0" maxOccurs="unbounded">-->
92<!-- <xsd:annotation>-->
93<!-- <xsd:documentation xml:lang="en">Describes the result of an individual testcase.</xsd:documentation>-->
94<!-- </xsd:annotation>-->
95<!-- </xsd:element>-->
96 <xsd:element name="testcase" type="testcase" minOccurs="0" maxOccurs="unbounded">
97 <xsd:annotation>
98 <xsd:documentation xml:lang="en">Describes the result of an individual testcase.</xsd:documentation>
99 </xsd:annotation>
100 </xsd:element>
101 <xsd:choice minOccurs="0" maxOccurs="unbounded">
102 <xsd:element name="system-out" type="literalblock" minOccurs="0">
103 <xsd:annotation>
104 <xsd:documentation xml:lang="en"></xsd:documentation>
105 </xsd:annotation>
106 </xsd:element>
107 <xsd:element name="system-err" type="literalblock" minOccurs="0">
108 <xsd:annotation>
109 <xsd:documentation xml:lang="en"></xsd:documentation>
110 </xsd:annotation>
111 </xsd:element>
112 </xsd:choice>
113 </xsd:sequence>
114 <xsd:attribute name="name" type="xsd:string" use="required" />
115 <xsd:attribute name="errors" type="xsd:nonNegativeInteger" use="optional" />
116 <xsd:attribute name="failures" type="xsd:nonNegativeInteger" use="optional" />
117 <xsd:attribute name="skipped" type="xsd:nonNegativeInteger" use="optional" />
118 <xsd:attribute name="tests" type="xsd:nonNegativeInteger" use="optional" />
119 <xsd:attribute name="assertions" type="xsd:nonNegativeInteger" use="optional" />
120 <xsd:attribute name="time" type="xsd:float" use="optional" />
121 <xsd:attribute name="timestamp" type="xsd:dateTime" use="optional" />
122 <xsd:attribute name="hostname" type="xsd:string" use="optional" />
123 <xsd:attribute name="file" type="xsd:string" use="optional" />
124 </xsd:complexType>
125
126 <xsd:complexType name="testsuites">
127 <xsd:sequence>
128 <xsd:element name="testsuite" type="testsuite" minOccurs="0" maxOccurs="unbounded">
129 <xsd:annotation>
130 <xsd:documentation xml:lang="en">Describes the aggregated results of multiple testcase.</xsd:documentation>
131 </xsd:annotation>
132 </xsd:element>
133 </xsd:sequence>
134 <xsd:attribute name="name" type="xsd:string" use="optional" />
135 <xsd:attribute name="errors" type="xsd:nonNegativeInteger" use="optional" />
136 <xsd:attribute name="failures" type="xsd:nonNegativeInteger" use="optional" />
137 <xsd:attribute name="skipped" type="xsd:nonNegativeInteger" use="optional" />
138 <xsd:attribute name="tests" type="xsd:nonNegativeInteger" use="optional" />
139 <xsd:attribute name="assertions" type="xsd:nonNegativeInteger" use="optional" />
140 <xsd:attribute name="time" type="xsd:float" use="optional" />
141 <xsd:attribute name="timestamp" type="xsd:dateTime" use="optional" />
142 <xsd:attribute name="hostname" type="xsd:string" use="optional" />
143 <xsd:attribute name="id" type="xsd:string" use="optional" /> <!-- OSVVM mistake -->
144 </xsd:complexType>
145
146 <xsd:element name="testsuites" type="testsuites">
147 <xsd:annotation>
148 <xsd:documentation xml:lang="en">Describes the overall result of all testcases in all testsuites.</xsd:documentation>
149 </xsd:annotation>
150 </xsd:element>
151</xsd:schema>