public class JUnit4PeachSuiteRunner
extends org.junit.runners.ParentRunner<org.junit.runner.Runner>
JUnit4PeachSuiteRunner as a runner allows you to manually
build a fuzzing 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(JUnit4PeachSuiteRunner.class) and
@PeachSuiteClasses({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 |
JUnit4PeachSuiteRunner.PeachSuiteClasses
The
SuiteClasses annotation specifies the classes to be run
when a class annotated with @RunWith(Suite.class) is run. |
| Modifier and Type | Field and Description |
|---|---|
protected static PeachContext |
_context |
static JUnit4PeachListener |
_listener |
| Modifier | Constructor and Description |
|---|---|
protected |
JUnit4PeachSuiteRunner(Class<?> klass,
Class<?>[] suiteClasses)
Call this when the default builder is good enough.
|
protected |
JUnit4PeachSuiteRunner(Class<?> klass,
List<org.junit.runner.Runner> runners)
Called by this class and subclasses once the runners making up the suite
have been determined
|
|
JUnit4PeachSuiteRunner(Class<?> klass,
org.junit.runners.model.RunnerBuilder builder)
Called reflectively on classes annotated with
@RunWith(JUnit4PeachSuiteRunner.class) |
|
JUnit4PeachSuiteRunner(org.junit.runners.model.RunnerBuilder builder,
Class<?>[] classes)
Call this when there is no single root class (for example, multiple class
names passed on the command line to
JUnitCore |
protected |
JUnit4PeachSuiteRunner(org.junit.runners.model.RunnerBuilder builder,
Class<?> klass,
Class<?>[] suiteClasses)
Called by this class and subclasses once the classes making up the suite
have been determined
|
| Modifier and Type | Method and Description |
|---|---|
protected org.junit.runners.model.Statement |
childrenInvoker(org.junit.runner.notification.RunNotifier notifier) |
protected org.junit.runner.Description |
describeChild(org.junit.runner.Runner child) |
static org.junit.runner.Runner |
emptySuite()
Returns an empty suite.
|
protected List<org.junit.runner.Runner> |
getChildren() |
protected void |
runChild(org.junit.runner.Runner runner,
org.junit.runner.notification.RunNotifier notifier) |
protected static List<org.junit.runner.Runner> |
runners(Class<?>[] children) |
classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClassesprotected static final PeachContext _context
public static JUnit4PeachListener _listener
public JUnit4PeachSuiteRunner(Class<?> klass, org.junit.runners.model.RunnerBuilder builder) throws org.junit.runners.model.InitializationError
@RunWith(JUnit4PeachSuiteRunner.class)klass - the root classbuilder - builds runners for classes in the suiteorg.junit.runners.model.InitializationError - throws exceptionpublic JUnit4PeachSuiteRunner(org.junit.runners.model.RunnerBuilder builder,
Class<?>[] classes)
throws org.junit.runners.model.InitializationError
JUnitCorebuilder - builds runners for classes in the suiteclasses - the classes in the suiteorg.junit.runners.model.InitializationError - throws exceptionprotected JUnit4PeachSuiteRunner(Class<?> klass, Class<?>[] suiteClasses) throws org.junit.runners.model.InitializationError
klass - the root of the suitesuiteClasses - the classes in the suiteorg.junit.runners.model.InitializationError - throws exceptionsprotected JUnit4PeachSuiteRunner(org.junit.runners.model.RunnerBuilder builder,
Class<?> klass,
Class<?>[] suiteClasses)
throws org.junit.runners.model.InitializationError
builder - builds runners for classes in the suiteklass - the root of the suitesuiteClasses - the classes in the suiteorg.junit.runners.model.InitializationError - throws exceptionsprotected JUnit4PeachSuiteRunner(Class<?> klass, List<org.junit.runner.Runner> runners) throws org.junit.runners.model.InitializationError
klass - root of the suiterunners - for each class in the suite, a Runnerorg.junit.runners.model.InitializationError - throws exceptionspublic static org.junit.runner.Runner emptySuite()
protected static List<org.junit.runner.Runner> runners(Class<?>[] children) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorprotected List<org.junit.runner.Runner> getChildren()
getChildren in class org.junit.runners.ParentRunner<org.junit.runner.Runner>protected org.junit.runner.Description describeChild(org.junit.runner.Runner child)
describeChild in class org.junit.runners.ParentRunner<org.junit.runner.Runner>protected org.junit.runners.model.Statement childrenInvoker(org.junit.runner.notification.RunNotifier notifier)
childrenInvoker in class org.junit.runners.ParentRunner<org.junit.runner.Runner>protected void runChild(org.junit.runner.Runner runner,
org.junit.runner.notification.RunNotifier notifier)
runChild in class org.junit.runners.ParentRunner<org.junit.runner.Runner>Copyright © 2018. All rights reserved.