Refactor tests
[SymbiYosys.git] / tests / junit / JUnit.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 elementFormDefault="qualified"
5 attributeFormDefault="unqualified">
6 <xs:annotation>
7 <xs:documentation xml:lang="en">JUnit test result schema for the Apache Ant JUnit and JUnitReport tasks
8 Copyright © 2011, Windy Road Technology Pty. Limited
9 The Apache Ant JUnit XML Schema is distributed under the terms of the Apache License Version 2.0 http://www.apache.org/licenses/
10 Permission to waive conditions of this license may be requested from Windy Road Support (http://windyroad.org/support).</xs:documentation>
11 </xs:annotation>
12 <xs:element name="testsuite" type="testsuite"/>
13 <xs:simpleType name="ISO8601_DATETIME_PATTERN">
14 <xs:restriction base="xs:dateTime">
15 <xs:pattern value="[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}"/>
16 </xs:restriction>
17 </xs:simpleType>
18 <xs:element name="testsuites">
19 <xs:annotation>
20 <xs:documentation xml:lang="en">Contains an aggregation of testsuite results</xs:documentation>
21 </xs:annotation>
22 <xs:complexType>
23 <xs:sequence>
24 <xs:element name="testsuite" minOccurs="0" maxOccurs="unbounded">
25 <xs:complexType>
26 <xs:complexContent>
27 <xs:extension base="testsuite">
28 <xs:attribute name="package" type="xs:token" use="required">
29 <xs:annotation>
30 <xs:documentation xml:lang="en">Derived from testsuite/@name in the non-aggregated documents</xs:documentation>
31 </xs:annotation>
32 </xs:attribute>
33 <xs:attribute name="id" type="xs:int" use="required">
34 <xs:annotation>
35 <xs:documentation xml:lang="en">Starts at '0' for the first testsuite and is incremented by 1 for each following testsuite</xs:documentation>
36 </xs:annotation>
37 </xs:attribute>
38 </xs:extension>
39 </xs:complexContent>
40 </xs:complexType>
41 </xs:element>
42 </xs:sequence>
43 </xs:complexType>
44 </xs:element>
45 <xs:complexType name="testsuite">
46 <xs:annotation>
47 <xs:documentation xml:lang="en">Contains the results of exexuting a testsuite</xs:documentation>
48 </xs:annotation>
49 <xs:sequence>
50 <xs:element name="properties">
51 <xs:annotation>
52 <xs:documentation xml:lang="en">Properties (e.g., environment settings) set during test execution</xs:documentation>
53 </xs:annotation>
54 <xs:complexType>
55 <xs:sequence>
56 <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
57 <xs:complexType>
58 <xs:attribute name="name" use="required">
59 <xs:simpleType>
60 <xs:restriction base="xs:token">
61 <xs:minLength value="1"/>
62 </xs:restriction>
63 </xs:simpleType>
64 </xs:attribute>
65 <xs:attribute name="value" type="xs:string" use="required"/>
66 </xs:complexType>
67 </xs:element>
68 </xs:sequence>
69 </xs:complexType>
70 </xs:element>
71 <xs:element name="testcase" minOccurs="0" maxOccurs="unbounded">
72 <xs:complexType>
73 <xs:choice minOccurs="0">
74 <xs:element name="skipped" />
75 <xs:element name="error" minOccurs="0" maxOccurs="1">
76 <xs:annotation>
77 <xs:documentation xml:lang="en">Indicates that the test errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the test. Contains as a text node relevant data for the error, e.g., a stack trace</xs:documentation>
78 </xs:annotation>
79 <xs:complexType>
80 <xs:simpleContent>
81 <xs:extension base="pre-string">
82 <xs:attribute name="message" type="xs:string">
83 <xs:annotation>
84 <xs:documentation xml:lang="en">The error message. e.g., if a java exception is thrown, the return value of getMessage()</xs:documentation>
85 </xs:annotation>
86 </xs:attribute>
87 <xs:attribute name="type" type="xs:string" use="required">
88 <xs:annotation>
89 <xs:documentation xml:lang="en">The type of error that occured. e.g., if a java execption is thrown the full class name of the exception.</xs:documentation>
90 </xs:annotation>
91 </xs:attribute>
92 </xs:extension>
93 </xs:simpleContent>
94 </xs:complexType>
95 </xs:element>
96 <xs:element name="failure">
97 <xs:annotation>
98 <xs:documentation xml:lang="en">Indicates that the test failed. A failure is a test which the code has explicitly failed by using the mechanisms for that purpose. e.g., via an assertEquals. Contains as a text node relevant data for the failure, e.g., a stack trace</xs:documentation>
99 </xs:annotation>
100 <xs:complexType>
101 <xs:simpleContent>
102 <xs:extension base="pre-string">
103 <xs:attribute name="message" type="xs:string">
104 <xs:annotation>
105 <xs:documentation xml:lang="en">The message specified in the assert</xs:documentation>
106 </xs:annotation>
107 </xs:attribute>
108 <xs:attribute name="type" type="xs:string" use="required">
109 <xs:annotation>
110 <xs:documentation xml:lang="en">The type of the assert.</xs:documentation>
111 </xs:annotation>
112 </xs:attribute>
113 </xs:extension>
114 </xs:simpleContent>
115 </xs:complexType>
116 </xs:element>
117 </xs:choice>
118 <xs:attribute name="name" type="xs:token" use="required">
119 <xs:annotation>
120 <xs:documentation xml:lang="en">Name of the test method</xs:documentation>
121 </xs:annotation>
122 </xs:attribute>
123 <xs:attribute name="classname" type="xs:token" use="required">
124 <xs:annotation>
125 <xs:documentation xml:lang="en">Full class name for the class the test method is in.</xs:documentation>
126 </xs:annotation>
127 </xs:attribute>
128 <xs:attribute name="time" type="xs:decimal" use="required">
129 <xs:annotation>
130 <xs:documentation xml:lang="en">Time taken (in seconds) to execute the test</xs:documentation>
131 </xs:annotation>
132 </xs:attribute>
133 <xs:attribute name="id" type="xs:string" use="optional">
134 <xs:annotation>
135 <xs:documentation xml:lang="en">Cell ID of the property</xs:documentation>
136 </xs:annotation>
137 </xs:attribute>
138 <xs:attribute name="type" type="xs:token" use="optional">
139 <xs:annotation>
140 <xs:documentation xml:lang="en">Kind of property (assert, cover, live)</xs:documentation>
141 </xs:annotation>
142 </xs:attribute>
143 <xs:attribute name="location" type="xs:token" use="optional">
144 <xs:annotation>
145 <xs:documentation xml:lang="en">Source location of the property</xs:documentation>
146 </xs:annotation>
147 </xs:attribute>
148 <xs:attribute name="tracefile" type="xs:token" use="optional">
149 <xs:annotation>
150 <xs:documentation xml:lang="en">Tracefile for the property</xs:documentation>
151 </xs:annotation>
152 </xs:attribute>
153 </xs:complexType>
154 </xs:element>
155 <xs:element name="system-out">
156 <xs:annotation>
157 <xs:documentation xml:lang="en">Data that was written to standard out while the test was executed</xs:documentation>
158 </xs:annotation>
159 <xs:simpleType>
160 <xs:restriction base="pre-string">
161 <xs:whiteSpace value="preserve"/>
162 </xs:restriction>
163 </xs:simpleType>
164 </xs:element>
165 <xs:element name="system-err">
166 <xs:annotation>
167 <xs:documentation xml:lang="en">Data that was written to standard error while the test was executed</xs:documentation>
168 </xs:annotation>
169 <xs:simpleType>
170 <xs:restriction base="pre-string">
171 <xs:whiteSpace value="preserve"/>
172 </xs:restriction>
173 </xs:simpleType>
174 </xs:element>
175 </xs:sequence>
176 <xs:attribute name="name" use="required">
177 <xs:annotation>
178 <xs:documentation xml:lang="en">Full class name of the test for non-aggregated testsuite documents. Class name without the package for aggregated testsuites documents</xs:documentation>
179 </xs:annotation>
180 <xs:simpleType>
181 <xs:restriction base="xs:token">
182 <xs:minLength value="1"/>
183 </xs:restriction>
184 </xs:simpleType>
185 </xs:attribute>
186 <xs:attribute name="timestamp" type="ISO8601_DATETIME_PATTERN" use="required">
187 <xs:annotation>
188 <xs:documentation xml:lang="en">when the test was executed. Timezone may not be specified.</xs:documentation>
189 </xs:annotation>
190 </xs:attribute>
191 <xs:attribute name="hostname" use="required">
192 <xs:annotation>
193 <xs:documentation xml:lang="en">Host on which the tests were executed. 'localhost' should be used if the hostname cannot be determined.</xs:documentation>
194 </xs:annotation>
195 <xs:simpleType>
196 <xs:restriction base="xs:token">
197 <xs:minLength value="1"/>
198 </xs:restriction>
199 </xs:simpleType>
200 </xs:attribute>
201 <xs:attribute name="tests" type="xs:int" use="required">
202 <xs:annotation>
203 <xs:documentation xml:lang="en">The total number of tests in the suite</xs:documentation>
204 </xs:annotation>
205 </xs:attribute>
206 <xs:attribute name="failures" type="xs:int" use="required">
207 <xs:annotation>
208 <xs:documentation xml:lang="en">The total number of tests in the suite that failed. A failure is a test which the code has explicitly failed by using the mechanisms for that purpose. e.g., via an assertEquals</xs:documentation>
209 </xs:annotation>
210 </xs:attribute>
211 <xs:attribute name="errors" type="xs:int" use="required">
212 <xs:annotation>
213 <xs:documentation xml:lang="en">The total number of tests in the suite that errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the test.</xs:documentation>
214 </xs:annotation>
215 </xs:attribute>
216 <xs:attribute name="skipped" type="xs:int" use="optional">
217 <xs:annotation>
218 <xs:documentation xml:lang="en">The total number of ignored or skipped tests in the suite.</xs:documentation>
219 </xs:annotation>
220 </xs:attribute>
221 <xs:attribute name="time" type="xs:decimal" use="required">
222 <xs:annotation>
223 <xs:documentation xml:lang="en">Time taken (in seconds) to execute the tests in the suite</xs:documentation>
224 </xs:annotation>
225 </xs:attribute>
226 </xs:complexType>
227 <xs:simpleType name="pre-string">
228 <xs:restriction base="xs:string">
229 <xs:whiteSpace value="preserve"/>
230 </xs:restriction>
231 </xs:simpleType>
232 </xs:schema>