Skip to content

Run Lots Of Testcases

andrewleo edited this page Nov 4, 2013 · 6 revisions

It's an easy and pleasant job to manufacture testcases with Dagger, so quickly you will have lots of testcases.

As we said Dagger uses TestNG to organize testcases, and TestNG uses xml file to organize testcases.

Suppose we have two testcases: TestNg.java and TestNgClone.java, so prepare demo.xml (you can find it under test-xml folder) such as:

<suite verbose="10" name="demo" annotations="JDK" time-out="1800000">

	<test name="TestNg" junit="false" annotations="JDK">
		<classes>
			<class name="com.netease.demo.TestNg" />
		</classes>
	</test>

	<test name="TestNgClone" junit="false" annotations="JDK">
		<classes>
			<class name="com.netease.demo.TestNgClone" />
		</classes>
	</test>

</suite>

Just run demo.xml as TestNG Suite in Eclipse, then the two testcases will be executed serially (or in parallel mode).

Then you can see emailable-report.html under target fold such as:

report

Clone this wiki locally