The following is an example document that follows the testdoc XSD:
<testdoc xmlns="http://www.smartics.de/project/process/implementation/testdoc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.smartics.de/project/process/implementation/testdoc http://www.smartics.de/project/process/implementation/testdoc"> <uut>de.smartics.test.SomeClass</uut> <scenarios> <scenario> <testCase>de.smartics.test.SomeClassWithTestMethodsTest</testCase> <testName>containsNoEmptyElements</testName> <sentence>Contains no empty elements.</sentence> <categories> <category>de.smartics.testdoc.categories.level.UnitLevel</category> </categories> </scenario> <scenario> <testCase>de.smartics.test.SomeClassWithTestMethodsTest</testCase> <testName>rejectsEmptyElements</testName> <sentence>Rejects empty elements.</sentence> <categories> <category>de.smartics.testdoc.categories.level.UnitLevel</category> </categories> </scenario> <scenario> <testCase>de.smartics.test.SomeClassWithTestMethodsTest</testCase> <testName>toStringThrowsNoExceptions</testName> <sentence>To string throws no exceptions.</sentence> <categories> <category>de.smartics.testdoc.categories.level.UnitLevel</category> <category>de.smartics.testdoc.categories.type.NonSpecific</category> </categories> </scenario> </scenarios> </testdoc>
The schema documentation that specifies the structure of a testdoc XML document.
<xsd:schema xmlns:tns="http://www.smartics.de/project/process/implementation/testdoc" targetNamespace="http://www.smartics.de/project/process/implementation/testdoc" elementFormDefault="qualified"> <xsd:element name="testdoc"> <xsd:complexType> <xsd:sequence> <xsd:choice> <xsd:element name="uut" type="xsd:string"> <xsd:annotation> <xsd:documentation> The fully qualified name of the class being tested. This is the unit under test (UUT). </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="scenarios" minOccurs="0"> <xsd:annotation> <xsd:documentation> The scenarios that test the UUT. </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence maxOccurs="unbounded"> <xsd:element name="scenario" type="tns:scenario-type"> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="scenario-type"> <xsd:annotation> <xsd:documentation> A single scenario that tests the UUT. </xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="testCase" type="xsd:string"> <xsd:annotation> <xsd:documentation> The fully qualified name of the test class that contains the testing code. </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="testName" type="xsd:string"> <xsd:annotation> <xsd:documentation> The name of the test method within the test case. </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="sentence" type="xsd:string"> <xsd:annotation> <xsd:documentation> The test name expanded into a sentence to be easily read by humans. </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="categories" type="tns:category-type" minOccurs="0"> <xsd:annotation> <xsd:documentation> The categories of the scenario. </xsd:documentation> </xsd:annotation> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="category-type"> <xsd:annotation> <xsd:documentation> A single category information. </xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="category" type="xsd:string"> <xsd:annotation> <xsd:documentation> The name of the category. </xsd:documentation> </xsd:annotation> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:schema>