public class BatchTestRunner
extends org.junit.runners.ParentRunner<org.junit.runner.Runner>
package com.example;
import org.junit.runner.RunWith;
@RunWith(de.oschoen.junit.runner.BatchTestRunner.class)
public class AllTests { }
Find all classes in package com.example and sub packages, whose name ends with Suite.
package com.example;
import org.junit.runner.RunWith;
@RunWith(de.oschoen.junit.runner.BatchTestRunner.class)
@BatchTestRunner.BatchTestInclude("**.*Suite")
public class AllTests {}
Exclude a package:
package com.example;
import org.junit.runner.RunWith;
@RunWith(de.oschoen.junit.runner.BatchTestRunner.class)
@BatchTestRunner.BatchTestExclude("**.shouldBeIgnored.**")
public class AllTests {}
| Modifier and Type | Class and Description |
|---|---|
static interface |
BatchTestRunner.BatchTestExclude |
static interface |
BatchTestRunner.BatchTestInclude |
| Modifier | Constructor and Description |
|---|---|
protected |
BatchTestRunner(Class<?> klass,
List<org.junit.runner.Runner> runners)
Called by this class and subclasses once the runners making up the suite have been determined
|
|
BatchTestRunner(Class<?> klass,
org.junit.runners.model.RunnerBuilder builder)
Called reflectively on classes annotated with
@RunWith(BatchTestRunner.class) |
|
BatchTestRunner(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 |
BatchTestRunner(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.runner.Description |
describeChild(org.junit.runner.Runner child) |
protected List<org.junit.runner.Runner> |
getChildren() |
protected void |
runChild(org.junit.runner.Runner runner,
org.junit.runner.notification.RunNotifier notifier) |
childrenInvoker, classBlock, classRules, collectInitializationErrors, filter, getDescription, getName, getRunnerAnnotations, getTestClass, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClassespublic BatchTestRunner(Class<?> klass, org.junit.runners.model.RunnerBuilder builder) throws org.junit.runners.model.InitializationError
@RunWith(BatchTestRunner.class)klass - the root classbuilder - builds runners for classes in the suiteorg.junit.runners.model.InitializationErrorpublic BatchTestRunner(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.InitializationErrorprotected BatchTestRunner(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.InitializationErrorprotected BatchTestRunner(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.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 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 © 2004-2013. All Rights Reserved.