This is a high-level overview of how I structure this; I will try and flesh this out when I get some down time.
From command line, invoke TestNG
java org.testng.TestNg FullRegression.xml
(from memory) (note, classpaths will probably need to be set up)
My file, FullRegression.xml just references other files.
<suite name="MyProjectTestSuite" verbose="3" >
<suite-files>
<suite-file path="./Regression_Story101.xml" />
<suite-file path="./Regression_Story102.xml" />
<suite-file path="./Regression_Story103.xml" />
<suite-file path="./Regression_Story104.xml" />
<suite-file path="./Regression_Story105.xml" />
<suite-file path="./Regression_Story106.xml" />
<suite-file path="./Regression_Story107.xml" />
<suite-file path="./Regression_Other.xml" />
<suite-file path="./Regression_Failing.xml" />
</suite-files>
</suite>
Example of a subsequent file looks something like this
<suite name="Story104" verbose="3" >
<test name="Regression1">
<groups>
<run>
<exclude name="overkill" />
<exclude name="failing" />
<include name="story104" />
</run>
</groups>
<packages>
<package name="com.whiteboxit.mattTestA.tests" />
</packages>
</test>
</suite>
Blogspot 'interpreted' my xml...The power of proof-reading. Anyway, fixed now.
ReplyDeleteAnt sent me here! Also TestNG FTW! Woot!
ReplyDeleteI can test too:
ReplyDeleteExample of a subsequent file looks something like this
*End*