5.3.5 TestSuite Objects

TestSuite objects behave much like TestCase objects, except they do not actually implement a test. Instead, they are used to aggregate tests into groups that should be run together. Some additional methods are available to add tests to TestSuite instances:

addTest(test)
Add a TestCase or TestSuite to the set of tests that make up the suite.

addTests(tests)
Add all the tests from a sequence of TestCase and TestSuite instances to this test suite.

The run() method is also slightly different:

run(result)
Run the tests associated with this suite, collecting the result into the test result object passed as result. Note that unlike TestCase.run(), TestSuite.run() requires the result object to be passed in.

In the typical usage of a TestSuite object, the run() method is invoked by a TestRunner rather than by the end-user test harness.

See About this document... for information on suggesting changes.