org.junit.runners
Class Suite
java.lang.Object
org.junit.runner.Runner
org.junit.internal.runners.TestClassRunner
org.junit.runners.Suite
- All Implemented Interfaces:
- Filterable, Sortable
- Direct Known Subclasses:
- Enclosed
public class Suite
- extends org.junit.internal.runners.TestClassRunner
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 junit.framework.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 Class Summary |
static interface |
Suite.SuiteClasses
The SuiteClasses annotation specifies the classes to be run when a class
annotated with @RunWith(Suite.class) is run. |
Fields inherited from class org.junit.internal.runners.TestClassRunner |
fEnclosedRunner |
Constructor Summary |
Suite(java.lang.Class<?> klass)
Internal use only. |
Suite(java.lang.Class<?> klass,
java.lang.Class[] annotatedClasses)
Internal use only. |
Methods inherited from class org.junit.internal.runners.TestClassRunner |
filter, getDescription, getTestClass, run, sort, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Suite
public Suite(java.lang.Class<?> klass)
throws org.junit.internal.runners.InitializationError
- Internal use only.
- Throws:
org.junit.internal.runners.InitializationError
Suite
public Suite(java.lang.Class<?> klass,
java.lang.Class[] annotatedClasses)
throws org.junit.internal.runners.InitializationError
- Internal use only.
- Throws:
org.junit.internal.runners.InitializationError