All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----junit.framework.TestSuite
TestSuite
is a Composite
of Tests.
It runs a collection of test cases. Here is an example using
the dynamic test definition.
TestSuite suite= new TestSuite(); suite.addTest(new MathTest("testAdd")); suite.addTest(new MathTest("testDivideByZero"));Alternatively, a TestSuite can extract the tests to be run automatically. To do so you pass the class of your TestCase class to the TestSuite constructor.
TestSuite suite= new TestSuite(MathTest.class);This constructor creates a suite with all the methods starting with "test" that take no arguments.
public TestSuite()
public TestSuite(Class theClass)
public void addTest(Test test)
public int countTestCases()
public void run(TestResult result)
All Packages Class Hierarchy This Package Previous Next Index