Blame view
framework/testtools/dtd/test-suite.xsd
5.6 KB
c16038356
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <!-- ================================================== ========== The Simple Methods Section ========== ================================================== (see further down for the Simple Map Processor Section) --> <!-- Reusable artifacts (abstract elements, groups, attributeGroups --> <xs:element name="TestCaseTypes" abstract="true"/> <xs:group name="AllTestCaseTypes"> <xs:choice> <xs:element ref="TestCaseTypes"/> </xs:choice> </xs:group> <!-- ELEMENTS start here --> <xs:element name="test-suite"> <xs:complexType> <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element ref="test-case"/> <xs:element ref="test-group"/> </xs:choice> <xs:attributeGroup ref="attlist.test-suite"/> </xs:complexType> </xs:element> <xs:attributeGroup name="attlist.test-suite"> <xs:attribute type="xs:string" name="suite-name" use="required"/> <xs:attribute type="xs:string" name="delegator-name" default="test"/> <xs:attribute type="xs:string" name="dispatcher-name" default="test-dispatcher"/> </xs:attributeGroup> <xs:element name="test-case"> <xs:annotation><xs:documentation></xs:documentation></xs:annotation> <xs:complexType> <xs:group minOccurs="1" maxOccurs="1" ref="AllTestCaseTypes"/> <xs:attributeGroup ref="attlist.test-case"/> </xs:complexType> </xs:element> <xs:attributeGroup name="attlist.test-case"> <xs:attribute type="xs:string" name="case-name" use="required"/> </xs:attributeGroup> <xs:element name="test-group"> <xs:annotation><xs:documentation></xs:documentation></xs:annotation> <xs:complexType> <xs:group minOccurs="1" maxOccurs="unbounded" ref="AllTestCaseTypes"/> <xs:attributeGroup ref="attlist.test-group"/> </xs:complexType> </xs:element> <xs:attributeGroup name="attlist.test-group"> <xs:attribute type="xs:string" name="case-name" use="required"/> </xs:attributeGroup> <xs:element name="junit-test-suite" substitutionGroup="TestCaseTypes"> <xs:annotation><xs:documentation>Used for JUnit test suites written as a Java class.</xs:documentation></xs:annotation> <xs:complexType> <xs:attributeGroup ref="attlist.junit-test-suite"/> </xs:complexType> </xs:element> <xs:attributeGroup name="attlist.junit-test-suite"> <xs:attribute type="xs:string" name="class-name" use="required"> <xs:annotation> <xs:documentation> At minimum should extend the junit.framework.TestCase class. If you want to use a GenericDelegator or LocalDispatcher you should extend the OFBizTestCase class and use the ones provided by it. </xs:documentation> </xs:annotation> </xs:attribute> </xs:attributeGroup> <xs:element name="service-test" substitutionGroup="TestCaseTypes"> <xs:complexType> <xs:attributeGroup ref="attlist.service-test"/> </xs:complexType> </xs:element> <xs:attributeGroup name="attlist.service-test"> <xs:attribute type="xs:string" name="service-name" use="required"/> </xs:attributeGroup> <xs:element name="simple-method-test" substitutionGroup="TestCaseTypes"> <xs:complexType> <xs:attributeGroup ref="attlist.simple-method-test"/> </xs:complexType> </xs:element> <xs:attributeGroup name="attlist.simple-method-test"> <xs:attribute type="xs:string" name="location" use="required"/> <xs:attribute type="xs:string" name="name"> <xs:annotation> <xs:documentation> The method-name of the simple-method to execute. If no name is supplied then all simple-methods from location with a method-name beginning with "test" will be added as individual tests. </xs:documentation> </xs:annotation> </xs:attribute> </xs:attributeGroup> <xs:element name="entity-xml" substitutionGroup="TestCaseTypes"> <xs:complexType> <xs:attributeGroup ref="attlist.entity-xml"/> </xs:complexType> </xs:element> <xs:attributeGroup name="attlist.entity-xml"> <xs:attribute type="xs:string" name="entity-xml-url" use="required"/> <xs:attribute name="action" use="optional" default="assert"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="assert"/> <xs:enumeration value="load"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:attributeGroup> </xs:schema> |