Known Direct Subclasses
|
Known Indirect Subclasses
AllTests |
Runner for use with JUnit 3.8.x-style AllTests classes
(those that only implement a static suite()
method). |
BlockJUnit4ClassRunner |
Implements the JUnit 4 standard test case class model, as defined by the
annotations in the org.junit package. |
Categories |
From a given set of test classes, runs only the classes and methods that are
annotated with either the category given with the @IncludeCategory
annotation, or a subtype of that category. |
Enclosed |
If you put tests in inner classes, Ant, for example, won't find them. |
JUnit4 |
Aliases the current default JUnit 4 class runner, for future-proofing. |
Parameterized |
The custom runner Parameterized implements parameterized tests. |
Suite |
Using Suite as a runner allows you to manually
build a suite containing tests from many classes. |
SuiteMethod |
Runner for use with JUnit 3.8.x-style AllTests classes
(those that only implement a static suite()
method). |
Theories |
|
|
Class Overview
A Runner
runs tests and notifies a RunNotifier
of significant events as it does so. You will need to subclass Runner
when using RunWith
to invoke a custom runner. When creating
a custom runner, in addition to implementing the abstract methods here you must
also provide a constructor that takes as an argument the Class
containing
the tests.
The default runner implementation guarantees that the instances of the test case
class will be constructed immediately before running the test and that the runner
will retain no reference to the test case instances, generally making them
available for garbage collection.
Public Constructors
Public Methods
public
abstract
void
run
(RunNotifier notifier)
Run the tests for this runner.
Parameters
notifier
| will be notified of events while tests are being run--tests being
started, finishing, and failing
|
public
int
testCount
()
Returns
- the number of tests to be run by the receiver