1 <?xml version="1.0" encoding="UTF-8"?>
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 elementFormDefault="qualified"
5 attributeFormDefault="unqualified">
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>
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}"/>
18 <xs:element name="testsuites">
20 <xs:documentation xml:lang="en">Contains an aggregation of testsuite results</xs:documentation>
24 <xs:element name="testsuite" minOccurs="0" maxOccurs="unbounded">
27 <xs:extension base="testsuite">
28 <xs:attribute name="package" type="xs:token" use="required">
30 <xs:documentation xml:lang="en">Derived from testsuite/@name in the non-aggregated documents</xs:documentation>
33 <xs:attribute name="id" type="xs:int" use="required">
35 <xs:documentation xml:lang="en">Starts at '0' for the first testsuite and is incremented by 1 for each following testsuite</xs:documentation>
45 <xs:complexType name="testsuite">
47 <xs:documentation xml:lang="en">Contains the results of exexuting a testsuite</xs:documentation>
50 <xs:element name="properties">
52 <xs:documentation xml:lang="en">Properties (e.g., environment settings) set during test execution</xs:documentation>
56 <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
58 <xs:attribute name="name" use="required">
60 <xs:restriction base="xs:token">
61 <xs:minLength value="1"/>
65 <xs:attribute name="value" type="xs:string" use="required"/>
71 <xs:element name="testcase" minOccurs="0" maxOccurs="unbounded">
73 <xs:choice minOccurs="0">
74 <xs:element name="skipped" />
75 <xs:element name="error" minOccurs="0" maxOccurs="1">
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>
81 <xs:extension base="pre-string">
82 <xs:attribute name="message" type="xs:string">
84 <xs:documentation xml:lang="en">The error message. e.g., if a java exception is thrown, the return value of getMessage()</xs:documentation>
87 <xs:attribute name="type" type="xs:string" use="required">
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>
96 <xs:element name="failure">
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>
102 <xs:extension base="pre-string">
103 <xs:attribute name="message" type="xs:string">
105 <xs:documentation xml:lang="en">The message specified in the assert</xs:documentation>
108 <xs:attribute name="type" type="xs:string" use="required">
110 <xs:documentation xml:lang="en">The type of the assert.</xs:documentation>
118 <xs:attribute name="name" type="xs:token" use="required">
120 <xs:documentation xml:lang="en">Name of the test method</xs:documentation>
123 <xs:attribute name="classname" type="xs:token" use="required">
125 <xs:documentation xml:lang="en">Full class name for the class the test method is in.</xs:documentation>
128 <xs:attribute name="time" type="xs:decimal" use="required">
130 <xs:documentation xml:lang="en">Time taken (in seconds) to execute the test</xs:documentation>
133 <xs:attribute name="id" type="xs:string" use="optional">
135 <xs:documentation xml:lang="en">Cell ID of the property</xs:documentation>
138 <xs:attribute name="type" type="xs:token" use="optional">
140 <xs:documentation xml:lang="en">Kind of property (assert, cover, live)</xs:documentation>
143 <xs:attribute name="location" type="xs:token" use="optional">
145 <xs:documentation xml:lang="en">Source location of the property</xs:documentation>
148 <xs:attribute name="tracefile" type="xs:token" use="optional">
150 <xs:documentation xml:lang="en">Tracefile for the property</xs:documentation>
155 <xs:element name="system-out">
157 <xs:documentation xml:lang="en">Data that was written to standard out while the test was executed</xs:documentation>
160 <xs:restriction base="pre-string">
161 <xs:whiteSpace value="preserve"/>
165 <xs:element name="system-err">
167 <xs:documentation xml:lang="en">Data that was written to standard error while the test was executed</xs:documentation>
170 <xs:restriction base="pre-string">
171 <xs:whiteSpace value="preserve"/>
176 <xs:attribute name="name" use="required">
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>
181 <xs:restriction base="xs:token">
182 <xs:minLength value="1"/>
186 <xs:attribute name="timestamp" type="ISO8601_DATETIME_PATTERN" use="required">
188 <xs:documentation xml:lang="en">when the test was executed. Timezone may not be specified.</xs:documentation>
191 <xs:attribute name="hostname" use="required">
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>
196 <xs:restriction base="xs:token">
197 <xs:minLength value="1"/>
201 <xs:attribute name="tests" type="xs:int" use="required">
203 <xs:documentation xml:lang="en">The total number of tests in the suite</xs:documentation>
206 <xs:attribute name="failures" type="xs:int" use="required">
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>
211 <xs:attribute name="errors" type="xs:int" use="required">
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>
216 <xs:attribute name="skipped" type="xs:int" use="optional">
218 <xs:documentation xml:lang="en">The total number of ignored or skipped tests in the suite.</xs:documentation>
221 <xs:attribute name="time" type="xs:decimal" use="required">
223 <xs:documentation xml:lang="en">Time taken (in seconds) to execute the tests in the suite</xs:documentation>
227 <xs:simpleType name="pre-string">
228 <xs:restriction base="xs:string">
229 <xs:whiteSpace value="preserve"/>