public class Suite
extends org.junit.internal.runners.CompositeRunner
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.| Modifier and Type | Class and Description |
|---|---|
static interface |
Suite.SuiteClasses
The
SuiteClasses annotation specifies the classes to be run when a class
annotated with @RunWith(Suite.class) is run. |
| Modifier | Constructor and Description |
|---|---|
|
Suite(java.lang.Class<?> klass)
Internal use only.
|
protected |
Suite(java.lang.Class<?> klass,
java.lang.Class<?>[] annotatedClasses) |
| Modifier and Type | Method and Description |
|---|---|
void |
run(RunNotifier notifier)
Run the tests for this runner.
|
protected void |
validate(org.junit.internal.runners.MethodValidator methodValidator) |
public Suite(java.lang.Class<?> klass)
throws org.junit.internal.runners.InitializationError
org.junit.internal.runners.InitializationErrorprotected Suite(java.lang.Class<?> klass,
java.lang.Class<?>[] annotatedClasses)
throws org.junit.internal.runners.InitializationError
org.junit.internal.runners.InitializationErrorprotected void validate(org.junit.internal.runners.MethodValidator methodValidator)
public void run(RunNotifier notifier)
Runnerrun in class org.junit.internal.runners.CompositeRunnernotifier - will be notified of events while tests are being run--tests being
started, finishing, and failing