|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | + |
| 3 | +<xs:schema 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="error"> |
| 75 | + <xs:annotation> |
| 76 | + <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> |
| 77 | + </xs:annotation> |
| 78 | + <xs:complexType> |
| 79 | + <xs:simpleContent> |
| 80 | + <xs:extension base="pre-string"> |
| 81 | + <xs:attribute name="message" type="xs:string"> |
| 82 | + <xs:annotation> |
| 83 | + <xs:documentation xml:lang="en">The error message. e.g., if a java exception is thrown, the return value of getMessage()</xs:documentation> |
| 84 | + </xs:annotation> |
| 85 | + </xs:attribute> |
| 86 | + <xs:attribute name="type" type="xs:string" use="required"> |
| 87 | + <xs:annotation> |
| 88 | + <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> |
| 89 | + </xs:annotation> |
| 90 | + </xs:attribute> |
| 91 | + </xs:extension> |
| 92 | + </xs:simpleContent> |
| 93 | + </xs:complexType> |
| 94 | + </xs:element> |
| 95 | + <xs:element name="failure"> |
| 96 | + <xs:annotation> |
| 97 | + <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> |
| 98 | + </xs:annotation> |
| 99 | + <xs:complexType> |
| 100 | + <xs:simpleContent> |
| 101 | + <xs:extension base="pre-string"> |
| 102 | + <xs:attribute name="message" type="xs:string"> |
| 103 | + <xs:annotation> |
| 104 | + <xs:documentation xml:lang="en">The message specified in the assert</xs:documentation> |
| 105 | + </xs:annotation> |
| 106 | + </xs:attribute> |
| 107 | + <xs:attribute name="type" type="xs:string" use="required"> |
| 108 | + <xs:annotation> |
| 109 | + <xs:documentation xml:lang="en">The type of the assert.</xs:documentation> |
| 110 | + </xs:annotation> |
| 111 | + </xs:attribute> |
| 112 | + </xs:extension> |
| 113 | + </xs:simpleContent> |
| 114 | + </xs:complexType> |
| 115 | + </xs:element> |
| 116 | + </xs:choice> |
| 117 | + <xs:attribute name="name" type="xs:token" use="required"> |
| 118 | + <xs:annotation> |
| 119 | + <xs:documentation xml:lang="en">Name of the test method</xs:documentation> |
| 120 | + </xs:annotation> |
| 121 | + </xs:attribute> |
| 122 | + <xs:attribute name="classname" type="xs:token" use="required"> |
| 123 | + <xs:annotation> |
| 124 | + <xs:documentation xml:lang="en">Full class name for the class the test method is in.</xs:documentation> |
| 125 | + </xs:annotation> |
| 126 | + </xs:attribute> |
| 127 | + <xs:attribute name="time" type="xs:decimal" use="required"> |
| 128 | + <xs:annotation> |
| 129 | + <xs:documentation xml:lang="en">Time taken (in seconds) to execute the test</xs:documentation> |
| 130 | + </xs:annotation> |
| 131 | + </xs:attribute> |
| 132 | + </xs:complexType> |
| 133 | + </xs:element> |
| 134 | + <xs:element name="system-out"> |
| 135 | + <xs:annotation> |
| 136 | + <xs:documentation xml:lang="en">Data that was written to standard out while the test was executed</xs:documentation> |
| 137 | + </xs:annotation> |
| 138 | + <xs:simpleType> |
| 139 | + <xs:restriction base="pre-string"> |
| 140 | + <xs:whiteSpace value="preserve"/> |
| 141 | + </xs:restriction> |
| 142 | + </xs:simpleType> |
| 143 | + </xs:element> |
| 144 | + <xs:element name="system-err"> |
| 145 | + <xs:annotation> |
| 146 | + <xs:documentation xml:lang="en">Data that was written to standard error while the test was executed</xs:documentation> |
| 147 | + </xs:annotation> |
| 148 | + <xs:simpleType> |
| 149 | + <xs:restriction base="pre-string"> |
| 150 | + <xs:whiteSpace value="preserve"/> |
| 151 | + </xs:restriction> |
| 152 | + </xs:simpleType> |
| 153 | + </xs:element> |
| 154 | + </xs:sequence> |
| 155 | + <xs:attribute name="name" use="required"> |
| 156 | + <xs:annotation> |
| 157 | + <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> |
| 158 | + </xs:annotation> |
| 159 | + <xs:simpleType> |
| 160 | + <xs:restriction base="xs:token"> |
| 161 | + <xs:minLength value="1"/> |
| 162 | + </xs:restriction> |
| 163 | + </xs:simpleType> |
| 164 | + </xs:attribute> |
| 165 | + <xs:attribute name="timestamp" type="ISO8601_DATETIME_PATTERN" use="required"> |
| 166 | + <xs:annotation> |
| 167 | + <xs:documentation xml:lang="en">when the test was executed. Timezone may not be specified.</xs:documentation> |
| 168 | + </xs:annotation> |
| 169 | + </xs:attribute> |
| 170 | + <xs:attribute name="hostname" use="required"> |
| 171 | + <xs:annotation> |
| 172 | + <xs:documentation xml:lang="en">Host on which the tests were executed. 'localhost' should be used if the hostname cannot be determined.</xs:documentation> |
| 173 | + </xs:annotation> |
| 174 | + <xs:simpleType> |
| 175 | + <xs:restriction base="xs:token"> |
| 176 | + <xs:minLength value="1"/> |
| 177 | + </xs:restriction> |
| 178 | + </xs:simpleType> |
| 179 | + </xs:attribute> |
| 180 | + <xs:attribute name="tests" type="xs:int" use="required"> |
| 181 | + <xs:annotation> |
| 182 | + <xs:documentation xml:lang="en">The total number of tests in the suite</xs:documentation> |
| 183 | + </xs:annotation> |
| 184 | + </xs:attribute> |
| 185 | + <xs:attribute name="failures" type="xs:int" use="required"> |
| 186 | + <xs:annotation> |
| 187 | + <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> |
| 188 | + </xs:annotation> |
| 189 | + </xs:attribute> |
| 190 | + <xs:attribute name="errors" type="xs:int" use="required"> |
| 191 | + <xs:annotation> |
| 192 | + <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> |
| 193 | + </xs:annotation> |
| 194 | + </xs:attribute> |
| 195 | + <xs:attribute name="time" type="xs:decimal" use="required"> |
| 196 | + <xs:annotation> |
| 197 | + <xs:documentation xml:lang="en">Time taken (in seconds) to execute the tests in the suite</xs:documentation> |
| 198 | + </xs:annotation> |
| 199 | + </xs:attribute> |
| 200 | + </xs:complexType> |
| 201 | + <xs:simpleType name="pre-string"> |
| 202 | + <xs:restriction base="xs:string"> |
| 203 | + <xs:whiteSpace value="preserve"/> |
| 204 | + </xs:restriction> |
| 205 | + </xs:simpleType> |
| 206 | +</xs:schema> |
0 commit comments