| java.lang.Object | |||
| ↳ | org.junit.runner.Runner | ||
| ↳ | org.junit.runners.ParentRunner<T> | ||
| ↳ | org.junit.runners.Suite | ||
Known Direct Subclasses
|
Using Suite as a runner allows you to manually
build a suite containing tests from many classes. It is the JUnit 4 equivalent of the JUnit 3.8.x
static Test suite() method. To use it, annotate a class
with @RunWith(Suite.class) and @SuiteClasses({TestClass1.class, ...}).
When you run this class, it will run all the tests in all the suite classes.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Suite.SuiteClasses | The SuiteClasses annotation specifies the classes to be run when a class
annotated with @RunWith(Suite.class) is run. |
||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Called reflectively on classes annotated with
@RunWith(Suite.class) | |||||||||||
Call this when there is no single root class (for example, multiple class names
passed on the command line to
JUnitCore | |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Call this when the default builder is good enough.
| |||||||||||
Called by this class and subclasses once the classes making up the suite have been determined
| |||||||||||
Called by this class and subclasses once the runners making up the suite have been determined
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns an empty suite.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a
Description for child, which can be assumed to
be an element of the list returned by getChildren()
| |||||||||||
Returns a list of objects that define the children of this Runner.
| |||||||||||
Runs the test corresponding to
child, which can be assumed to be
an element of the list returned by getChildren(). | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.junit.runners.ParentRunner
| |||||||||||
From class
org.junit.runner.Runner
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.junit.runner.Describable
| |||||||||||
From interface
org.junit.runner.manipulation.Filterable
| |||||||||||
From interface
org.junit.runner.manipulation.Sortable
| |||||||||||
Called reflectively on classes annotated with @RunWith(Suite.class)
| klass | the root class |
|---|---|
| builder | builds runners for classes in the suite |
| InitializationError |
|---|
Call this when there is no single root class (for example, multiple class names
passed on the command line to JUnitCore
| builder | builds runners for classes in the suite |
|---|---|
| classes | the classes in the suite |
| InitializationError |
|---|
Call this when the default builder is good enough. Left in for compatibility with JUnit 4.4.
| klass | the root of the suite |
|---|---|
| suiteClasses | the classes in the suite |
| InitializationError |
|---|
Called by this class and subclasses once the classes making up the suite have been determined
| builder | builds runners for classes in the suite |
|---|---|
| klass | the root of the suite |
| suiteClasses | the classes in the suite |
| InitializationError |
|---|
Called by this class and subclasses once the runners making up the suite have been determined
| klass | root of the suite |
|---|---|
| runners | for each class in the suite, a Runner |
| InitializationError |
|---|
Returns a Description for child, which can be assumed to
be an element of the list returned by getChildren()
Returns a list of objects that define the children of this Runner.
Runs the test corresponding to child, which can be assumed to be
an element of the list returned by getChildren().
Subclasses are responsible for making sure that relevant test events are
reported through notifier