forked from anujgandharv/easytest
-
Notifications
You must be signed in to change notification settings - Fork 15
/
testDataSchema.xsd
102 lines (93 loc) · 3.85 KB
/
testDataSchema.xsd
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
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:org:easetech:easytest:1.0" xmlns:tns="urn:org:easetech:easytest:1.0">
<xsd:element name="InputTestData">
<xsd:annotation>
<xsd:documentation>Base element to capture the Input Test Data.
This is the schema that the users should follow if they want
EasyTest framework to load their XML data for their test cases.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Description" type="xsd:string"
minOccurs="0" maxOccurs="1" />
<xsd:element name="TestMethod" type="tns:TestMethod"
minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="TestMethod">
<xsd:annotation>
<xsd:documentation>Information about a single test method. This will
contain the name of the test method
as attribute and a multiple Test Records within the test Method. Each
TestRecord signifies a single execution of the given test method.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Description" type="xsd:string"
minOccurs="0" maxOccurs="1" />
<xsd:element name="TestRecord" type="tns:TestRecord"
minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="TestRecord">
<xsd:annotation>
<xsd:documentation>Test Record captures the test data for a single
execution of the enclosing TestMethod.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Description" type="xsd:string"
minOccurs="0" maxOccurs="1" />
<xsd:element name="InputData" type="tns:InputData"
minOccurs="1" maxOccurs="1" />
<xsd:element name="OutputData" type="tns:OutputData"
minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="InputData">
<xsd:annotation>
<xsd:documentation>InputData element identifies the single execution record for a given test.
This means that each entry element within the InputData element will be captured in a single Map
and will be passed to the test method as its method arguments.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Entry" type="tns:Entry" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OutputData">
<xsd:annotation>
<xsd:documentation>OutputData element identifies the data that has been returned by the Test method.
A user never provides the value of OutputData element. It is created on the fly by the XMLDataLoader class of teh framework.
In case a user specifies the element, it will be ignored.
From a user's perspective, if a user wants to capture the output data to a file, all he/she has to do is return the data from the method.
Rest all will be taken care of by the framework.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Entry" type="tns:Entry" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Entry">
<xsd:annotation>
<xsd:documentation>Each Entry identifies a single key/value pair
where key is the name of the parameter and value is its value.
</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="key" type="tns:EntryVal" use="required" />
<xsd:attribute name="value" type="tns:EntryVal" use="required" />
</xsd:complexType>
<xsd:simpleType name="EntryVal">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1" />
<xsd:maxLength value="400" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>