xref: /aosp_15_r20/external/testng/src/main/java/testng-1.0.dtd.html (revision 83a54b2f2026052c38867f4cde56111edcd60b56)
1*83a54b2fSSadaf Ebrahimi<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2*83a54b2fSSadaf Ebrahimi
3*83a54b2fSSadaf Ebrahimi<html>
4*83a54b2fSSadaf Ebrahimi    <head>
5*83a54b2fSSadaf Ebrahimi    <title>DTD for TestNG 1.0</title>
6*83a54b2fSSadaf Ebrahimi        <link rel="stylesheet" href="http://beust.com/beust.css" type="text/css"/>
7*83a54b2fSSadaf Ebrahimi    </head>
8*83a54b2fSSadaf Ebrahimi<body>
9*83a54b2fSSadaf Ebrahimi
10*83a54b2fSSadaf Ebrahimi<pre class="code"><span class="xml-comment">&lt;!--
11*83a54b2fSSadaf Ebrahimi
12*83a54b2fSSadaf EbrahimiHere is a quick overview of the main parts of this DTD.  For more information,
13*83a54b2fSSadaf Ebrahimirefer to the &lt;a <span class="attribute">href="http://testng.org"</span> &gt;main web site<span class="tag">&lt;/a&gt;.
14*83a54b2fSSadaf Ebrahimi
15*83a54b2fSSadaf Ebrahimi</span>
16*83a54b2fSSadaf EbrahimiA <span class="tag">&lt;b&gt;suite&lt;/b&gt;</span> is made of <span class="tag">&lt;b&gt;tests&lt;/b&gt;</span> and <span class="tag">&lt;b&gt;parameters&lt;/b&gt;.
17*83a54b2fSSadaf Ebrahimi</span>
18*83a54b2fSSadaf Ebrahimi
19*83a54b2fSSadaf EbrahimiA <span class="tag">&lt;b&gt;test&lt;/b&gt;</span> is made of three parts:
20*83a54b2fSSadaf Ebrahimi
21*83a54b2fSSadaf Ebrahimi<span class="tag">&lt;ul&gt;
22*83a54b2fSSadaf Ebrahimi&lt;li&gt;</span> <span class="tag">&lt;b&gt;parameters&lt;/b&gt;,</span> which override the suite parameters
23*83a54b2fSSadaf Ebrahimi<span class="tag">&lt;li&gt;</span> <span class="tag">&lt;b&gt;groups&lt;/b&gt;,</span> made of two parts
24*83a54b2fSSadaf Ebrahimi
25*83a54b2fSSadaf Ebrahimi<span class="tag">&lt;li&gt;</span> <span class="tag">&lt;b&gt;classes&lt;/b&gt;,</span> defining which classes are going to be part
26*83a54b2fSSadaf Ebrahimi  of this test run
27*83a54b2fSSadaf Ebrahimi<span class="tag">&lt;/ul&gt;
28*83a54b2fSSadaf Ebrahimi</span>
29*83a54b2fSSadaf EbrahimiIn turn, <span class="tag">&lt;b&gt;groups&lt;/b&gt;</span> are made of two parts:
30*83a54b2fSSadaf Ebrahimi
31*83a54b2fSSadaf Ebrahimi<span class="tag">&lt;ul&gt;
32*83a54b2fSSadaf Ebrahimi&lt;li&gt;</span> Definitions, which allow you to group groups into
33*83a54b2fSSadaf Ebrahimi  bigger groups
34*83a54b2fSSadaf Ebrahimi<span class="tag">&lt;li&gt;</span> Runs, which defines the groups that the methods
35*83a54b2fSSadaf Ebrahimi  must belong to in order to be run during this test
36*83a54b2fSSadaf Ebrahimi<span class="tag">&lt;/ul&gt;
37*83a54b2fSSadaf Ebrahimi</span>
38*83a54b2fSSadaf EbrahimiCedric Beust & Alexandru Popescu
39*83a54b2fSSadaf Ebrahimi@title DTD for TestNG
40*83a54b2fSSadaf Ebrahimi@root suite
41*83a54b2fSSadaf Ebrahimi
42*83a54b2fSSadaf Ebrahimi--&gt;</span>
43*83a54b2fSSadaf Ebrahimi
44*83a54b2fSSadaf Ebrahimi
45*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- A suite is the top-level element of a testng.xml file                  --&gt;</span>
46*83a54b2fSSadaf Ebrahimi
47*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT suite (listeners|packages|test|parameter|method-selectors|suite-files)* &gt;
48*83a54b2fSSadaf Ebrahimi
49*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- Attributes: --&gt;</span>
50*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!--
51*83a54b2fSSadaf Ebrahimi@attr  name        The name of this suite (as it will appear in the reports)
52*83a54b2fSSadaf Ebrahimi@attr  junit       Whether to run in JUnit mode.
53*83a54b2fSSadaf Ebrahimi@attr  verbose     How verbose the output on the console will be.
54*83a54b2fSSadaf Ebrahimi                This setting has no impact on the HTML reports.
55*83a54b2fSSadaf Ebrahimi@attr  parallel   Whether TestNG should use different threads
56*83a54b2fSSadaf Ebrahimi                to run your tests (might speed up the process)
57*83a54b2fSSadaf Ebrahimi@attr  configfailurepolicy  Whether to continue attempting Before/After
58*83a54b2fSSadaf Ebrahimi                Class/Methods after they've failed once or just skip remaining.
59*83a54b2fSSadaf Ebrahimi@attr  thread-count An integer giving the size of the thread pool to use
60*83a54b2fSSadaf Ebrahimi                if you set parallel.
61*83a54b2fSSadaf Ebrahimi@attr  annotations  If "javadoc", TestNG will look for
62*83a54b2fSSadaf Ebrahimi                JavaDoc annotations in your sources, otherwise it will
63*83a54b2fSSadaf Ebrahimi                use JDK5 annotations.
64*83a54b2fSSadaf Ebrahimi@attr  time-out     The time to wait in milliseconds before aborting the
65*83a54b2fSSadaf Ebrahimi                method (if <span class="attribute">parallel="methods"</span> ) or the test (parallel="tests")
66*83a54b2fSSadaf Ebrahimi@attr  skipfailedinvocationCounts Whether to skip failed invocations.
67*83a54b2fSSadaf Ebrahimi@attr  data-provider-thread-count An integer giving the size of the thread pool to use
68*83a54b2fSSadaf Ebrahimi       for parallel data providers.
69*83a54b2fSSadaf Ebrahimi@attr  object-factory A class that implements IObjectFactory that will be used to
70*83a54b2fSSadaf Ebrahimi       instantiate the test objects.
71*83a54b2fSSadaf Ebrahimi--&gt;</span>
72*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST suite
73*83a54b2fSSadaf Ebrahimi    name CDATA #REQUIRED
74*83a54b2fSSadaf Ebrahimi    junit (true | false) "false"
75*83a54b2fSSadaf Ebrahimi    verbose CDATA #IMPLIED
76*83a54b2fSSadaf Ebrahimi    parallel (false | methods | tests | classes) "false"
77*83a54b2fSSadaf Ebrahimi    configfailurepolicy (skip | continue) "skip"
78*83a54b2fSSadaf Ebrahimi    thread-count CDATA "5"
79*83a54b2fSSadaf Ebrahimi    annotations CDATA #IMPLIED
80*83a54b2fSSadaf Ebrahimi    time-out CDATA #IMPLIED
81*83a54b2fSSadaf Ebrahimi    skipfailedinvocationCounts (true | false) "false"
82*83a54b2fSSadaf Ebrahimi    data-provider-thread-count CDATA "10"
83*83a54b2fSSadaf Ebrahimi    object-factory CDATA #IMPLIED
84*83a54b2fSSadaf Ebrahimi&gt;
85*83a54b2fSSadaf Ebrahimi
86*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- A list of XML files that contain more suite descriptions --&gt;</span>
87*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT suite-files (suite-file)* &gt;
88*83a54b2fSSadaf Ebrahimi
89*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT suite-file ANY &gt;
90*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST suite-file
91*83a54b2fSSadaf Ebrahimi    path CDATA #REQUIRED
92*83a54b2fSSadaf Ebrahimi&gt;
93*83a54b2fSSadaf Ebrahimi
94*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!--
95*83a54b2fSSadaf EbrahimiParameters can be defined at the <span class="tag">&lt;suite&gt;</span> or at the <span class="tag">&lt;test&gt;</span> level.
96*83a54b2fSSadaf EbrahimiParameters defined at the <span class="tag">&lt;test&gt;</span> level override parameters of the same name in <span class="tag">&lt;suite&gt;
97*83a54b2fSSadaf Ebrahimi
98*83a54b2fSSadaf EbrahimiParameters</span> are used to link Java method parameters to their actual value, defined here.
99*83a54b2fSSadaf Ebrahimi--&gt;</span>
100*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT parameter ANY&gt;
101*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST parameter
102*83a54b2fSSadaf Ebrahimi    name CDATA #REQUIRED
103*83a54b2fSSadaf Ebrahimi    value CDATA #REQUIRED &gt;
104*83a54b2fSSadaf Ebrahimi
105*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!--
106*83a54b2fSSadaf EbrahimiMethod selectors define user classes used to select which methods to run.
107*83a54b2fSSadaf EbrahimiThey need to implement <span class="tag">&lt;tt&gt;org.testng.IMethodSelector&lt;/tt&gt;</span>
108*83a54b2fSSadaf Ebrahimi--&gt;</span>
109*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT method-selectors (method-selector*) &gt;
110*83a54b2fSSadaf Ebrahimi
111*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT method-selector ((selector-class)*|script) &gt;
112*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT selector-class ANY&gt;
113*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST selector-class
114*83a54b2fSSadaf Ebrahimi    name CDATA #REQUIRED
115*83a54b2fSSadaf Ebrahimi  priority CDATA #IMPLIED
116*83a54b2fSSadaf Ebrahimi&gt;
117*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT script ANY&gt;
118*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST script
119*83a54b2fSSadaf Ebrahimi    language CDATA #REQUIRED
120*83a54b2fSSadaf Ebrahimi&gt;
121*83a54b2fSSadaf Ebrahimi
122*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!--
123*83a54b2fSSadaf EbrahimiA test contains parameters and classes.  Additionally, you can define additional groups ("groups of groups")
124*83a54b2fSSadaf Ebrahimi--&gt;</span>
125*83a54b2fSSadaf Ebrahimi
126*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT test (method-selectors?,parameter*,groups?,packages?,classes?) &gt;
127*83a54b2fSSadaf Ebrahimi
128*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!--
129*83a54b2fSSadaf Ebrahimi@attr  name         The name of this test (as it will appear in the reports)
130*83a54b2fSSadaf Ebrahimi@attr  junit        Whether to run in JUnit mode.
131*83a54b2fSSadaf Ebrahimi@attr  verbose      How verbose the output on the console will be.
132*83a54b2fSSadaf Ebrahimi                This setting has no impact on the HTML reports.
133*83a54b2fSSadaf Ebrahimi                Default value: suite level verbose.
134*83a54b2fSSadaf Ebrahimi@attr  parallel     Whether TestNG should use different threads
135*83a54b2fSSadaf Ebrahimi                to run your tests (might speed up the process)
136*83a54b2fSSadaf Ebrahimi@attr  thread-count An integer giving the size of the thread pool to be used if
137*83a54b2fSSadaf Ebrahimi                parallel mode is used. Overrides the suite level value.
138*83a54b2fSSadaf Ebrahimi@attr  annotations  If "javadoc", TestNG will look for
139*83a54b2fSSadaf Ebrahimi                JavaDoc annotations in your sources, otherwise it will
140*83a54b2fSSadaf Ebrahimi                use JDK5 annotations.
141*83a54b2fSSadaf Ebrahimi@attr  time-out     the time to wait in milliseconds before aborting
142*83a54b2fSSadaf Ebrahimi                the method (if <span class="attribute">parallel="methods"</span> ) or the test (if <span class="attribute">parallel="tests"</span> )
143*83a54b2fSSadaf Ebrahimi@attr  enabled      flag to enable/disable current test. Default value: true
144*83a54b2fSSadaf Ebrahimi@attr  skipfailedinvocationCounts Whether to skip failed invocations.
145*83a54b2fSSadaf Ebrahimi--&gt;</span>
146*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST test
147*83a54b2fSSadaf Ebrahimi    name CDATA #REQUIRED
148*83a54b2fSSadaf Ebrahimi    junit (true | false) "false"
149*83a54b2fSSadaf Ebrahimi    verbose  CDATA #IMPLIED
150*83a54b2fSSadaf Ebrahimi    parallel  CDATA #IMPLIED
151*83a54b2fSSadaf Ebrahimi    thread-count CDATA #IMPLIED
152*83a54b2fSSadaf Ebrahimi    annotations  CDATA #IMPLIED
153*83a54b2fSSadaf Ebrahimi    time-out CDATA #IMPLIED
154*83a54b2fSSadaf Ebrahimi    enabled CDATA #IMPLIED
155*83a54b2fSSadaf Ebrahimi    skipfailedinvocationCounts (true | false) "false"
156*83a54b2fSSadaf Ebrahimi&gt;
157*83a54b2fSSadaf Ebrahimi
158*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!--
159*83a54b2fSSadaf EbrahimiDefines additional groups ("groups of groups") and also which groups to include in this test run
160*83a54b2fSSadaf Ebrahimi--&gt;</span>
161*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT groups (define*,run?) &gt;
162*83a54b2fSSadaf Ebrahimi
163*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT define (include*)&gt;
164*83a54b2fSSadaf Ebrahimi
165*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST define
166*83a54b2fSSadaf Ebrahimi    name CDATA #REQUIRED&gt;
167*83a54b2fSSadaf Ebrahimi
168*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- Defines which groups to include in the current group of groups         --&gt;</span>
169*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT include ANY&gt;
170*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST include
171*83a54b2fSSadaf Ebrahimi    name CDATA #REQUIRED&gt;
172*83a54b2fSSadaf Ebrahimi
173*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- Defines which groups to exclude from the current group of groups       --&gt;</span>
174*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT exclude ANY&gt;
175*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST exclude
176*83a54b2fSSadaf Ebrahimi    name CDATA #REQUIRED&gt;
177*83a54b2fSSadaf Ebrahimi
178*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- The subtag of groups used to define which groups should be run         --&gt;</span>
179*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT run (include?,exclude?)* &gt;
180*83a54b2fSSadaf Ebrahimi
181*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- The list of classes to include in this test                            --&gt;</span>
182*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT classes (class*) &gt;
183*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT class (methods*) &gt;
184*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST class
185*83a54b2fSSadaf Ebrahimi    name CDATA #REQUIRED &gt;
186*83a54b2fSSadaf Ebrahimi
187*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- The list of packages to include in this test                           --&gt;</span>
188*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT packages (package*) &gt;
189*83a54b2fSSadaf Ebrahimi
190*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- The package description.
191*83a54b2fSSadaf Ebrahimi     If the package name ends with .* then subpackages are included too.
192*83a54b2fSSadaf Ebrahimi--&gt;</span>
193*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT package (include?,exclude?)*&gt;
194*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST package
195*83a54b2fSSadaf Ebrahimi    name CDATA #REQUIRED &gt;
196*83a54b2fSSadaf Ebrahimi
197*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- The list of methods to include/exclude from this test                 --&gt;</span>
198*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT methods (include?,exclude?)* &gt;
199*83a54b2fSSadaf Ebrahimi
200*83a54b2fSSadaf Ebrahimi<span class="xml-comment">&lt;!-- The list of listeners that will be passed to TestNG --&gt;</span>
201*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT listeners (listener*) &gt;
202*83a54b2fSSadaf Ebrahimi
203*83a54b2fSSadaf Ebrahimi&lt;!ELEMENT listener ANY&gt;
204*83a54b2fSSadaf Ebrahimi&lt;!ATTLIST listener
205*83a54b2fSSadaf Ebrahimi    class-name CDATA #REQUIRED &gt;
206*83a54b2fSSadaf Ebrahimi</pre>
207