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