forked from testng-team/testng-team.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testng-1.0.dtd
executable file
·213 lines (184 loc) · 8.14 KB
/
testng-1.0.dtd
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!--
Here is a quick overview of the main parts of this DTD. For more information,
refer to the <a href="https://testng.org">main web site</a>.
A <b>suite</b> is made of <b>tests</b> and <b>parameters</b>.
A <b>test</b> is made of three parts:
<ul>
<li> <b>parameters</b>, which override the suite parameters
<li> <b>groups</b>, made of two parts
<li> <b>classes</b>, defining which classes are going to be part
of this test run
</ul>
In turn, <b>groups</b> are made of two parts:
<ul>
<li> Definitions, which allow you to group groups into
bigger groups
<li> Runs, which defines the groups that the methods
must belong to in order to be run during this test
</ul>
Cedric Beust & Alexandru Popescu
@title DTD for TestNG
@root suite
-->
<!-- A suite is the top-level element of a testng.xml file -->
<!ELEMENT suite (groups?,(listeners|packages|test|parameter|method-selectors|suite-files)*) >
<!-- Attributes: -->
<!--
@attr name The name of this suite (as it will appear in the reports)
@attr junit Whether to run in JUnit mode.
@attr verbose How verbose the output on the console will be.
This setting has no impact on the HTML reports.
@attr parallel Whether TestNG should use different threads
to run your tests (might speed up the process)
Do not use "true" and "false" values, they are now deprecated.
@attr parent-module A module used to create the parent injector of all guice injectors used
in tests of the suite
@attr guice-stage The stage with which the parent injector is created
@attr configfailurepolicy Whether to continue attempting Before/After
Class/Methods after they've failed once or just skip remaining.
@attr thread-count An integer giving the size of the thread pool to use
if you set parallel.
@attr annotations If "javadoc", TestNG will look for
JavaDoc annotations in your sources, otherwise it will
use JDK5 annotations.
@attr time-out The time to wait in milliseconds before aborting the
method (if parallel="methods") or the test (parallel="tests")
@attr skipfailedinvocationcounts Whether to skip failed invocations.
@attr data-provider-thread-count An integer giving the size of the thread pool to use
for parallel data providers.
@attr object-factory A class that implements IObjectFactory that will be used to
instantiate the test objects.
@attr allow-return-values If true, tests that return a value will be run as well
-->
<!ATTLIST suite
name CDATA #REQUIRED
junit (true | false) "false"
verbose CDATA #IMPLIED
parallel (false | true | none | methods | tests | classes | instances) "none"
parent-module CDATA #IMPLIED
guice-stage (DEVELOPMENT | PRODUCTION | TOOL) "DEVELOPMENT"
configfailurepolicy (skip | continue) "skip"
thread-count CDATA "5"
annotations CDATA #IMPLIED
time-out CDATA #IMPLIED
skipfailedinvocationcounts (true | false) "false"
data-provider-thread-count CDATA "10"
object-factory CDATA #IMPLIED
group-by-instances (true | false) "false"
preserve-order (true | false) "true"
allow-return-values (true | false) "false"
>
<!-- A list of XML files that contain more suite descriptions -->
<!ELEMENT suite-files (suite-file)* >
<!ELEMENT suite-file ANY >
<!ATTLIST suite-file
path CDATA #REQUIRED
>
<!--
Parameters can be defined at the <suite> or at the <test> level.
Parameters defined at the <test> level override parameters of the same name in <suite>
Parameters are used to link Java method parameters to their actual value, defined here.
-->
<!ELEMENT parameter ANY>
<!ATTLIST parameter
name CDATA #REQUIRED
value CDATA #REQUIRED >
<!--
Method selectors define user classes used to select which methods to run.
They need to implement <tt>org.testng.IMethodSelector</tt>
-->
<!ELEMENT method-selectors (method-selector*) >
<!ELEMENT method-selector ((selector-class)*|script) >
<!ELEMENT selector-class ANY>
<!ATTLIST selector-class
name CDATA #REQUIRED
priority CDATA #IMPLIED
>
<!ELEMENT script ANY>
<!ATTLIST script
language CDATA #REQUIRED
>
<!--
A test contains parameters and classes. Additionally, you can define additional groups ("groups of groups")
-->
<!ELEMENT test (method-selectors?,parameter*,groups?,packages?,classes?) >
<!--
@attr name The name of this test (as it will appear in the reports)
@attr junit Whether to run in JUnit mode.
@attr verbose How verbose the output on the console will be.
This setting has no impact on the HTML reports.
Default value: suite level verbose.
@attr parallel Whether TestNG should use different threads
to run your tests (might speed up the process)
Do not use "true" and "false" values, they are now deprecated.
@attr thread-count An integer giving the size of the thread pool to be used if
parallel mode is used. Overrides the suite level value.
@attr annotations If "javadoc", TestNG will look for
JavaDoc annotations in your sources, otherwise it will
use JDK5 annotations.
@attr time-out the time to wait in milliseconds before aborting
the method (if parallel="methods") or the test (if parallel="tests")
@attr enabled flag to enable/disable current test. Default value: true
@attr skipfailedinvocationcounts Whether to skip failed invocations.
@attr preserve-order If true, the classes in this tag will be run in the same order as
found in the XML file.
@attr allow-return-values If true, tests that return a value will be run as well
-->
<!ATTLIST test
name CDATA #REQUIRED
junit (true | false) "false"
verbose CDATA #IMPLIED
parallel (false | true | none | methods | tests | classes | instances) #IMPLIED
thread-count CDATA #IMPLIED
annotations CDATA #IMPLIED
time-out CDATA #IMPLIED
enabled (true | false) #IMPLIED
skipfailedinvocationcounts (true | false) "false"
preserve-order (true | false) "true"
group-by-instances (true | false) "false"
allow-return-values (true | false) "false"
>
<!--
Defines additional groups ("groups of groups") and also which groups to include in this test run
-->
<!ELEMENT groups (define*,run?,dependencies?) >
<!ELEMENT define (include*)>
<!ATTLIST define
name CDATA #REQUIRED>
<!-- Defines which groups to include in the current group of groups -->
<!ELEMENT include ANY>
<!ATTLIST include
name CDATA #REQUIRED
description CDATA #IMPLIED
invocation-numbers CDATA #IMPLIED>
<!-- Defines which groups to exclude from the current group of groups -->
<!ELEMENT exclude ANY>
<!ATTLIST exclude
name CDATA #REQUIRED>
<!-- The subtag of groups used to define which groups should be run -->
<!ELEMENT run (include?,exclude?)* >
<!ELEMENT dependencies (group*)>
<!ELEMENT group ANY>
<!ATTLIST group
name CDATA #REQUIRED
depends-on CDATA #REQUIRED>
<!-- The list of classes to include in this test -->
<!ELEMENT classes (class*,parameter*) >
<!ELEMENT class (methods|parameter)* >
<!ATTLIST class
name CDATA #REQUIRED >
<!-- The list of packages to include in this test -->
<!ELEMENT packages (package*) >
<!-- The package description.
If the package name ends with .* then subpackages are included too.
-->
<!ELEMENT package (include?,exclude?)*>
<!ATTLIST package
name CDATA #REQUIRED >
<!-- The list of methods to include/exclude from this test -->
<!ELEMENT methods (include?,exclude?,parameter?)* >
<!-- The list of listeners that will be passed to TestNG -->
<!ELEMENT listeners (listener*) >
<!ELEMENT listener ANY>
<!ATTLIST listener
class-name CDATA #REQUIRED >