|
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: NESTED | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 | ||||||||
org.junit.runners Class Suite
java.lang.Objectorg.junit.runner.Runner
org.junit.runners.ParentRunner<Runner>
org.junit.runners.Suite
- 所有已实现接口:
- Describable, Filterable, Sortable
- 已知直接子类:
- Parameterized
public class Suite
- extends ParentRunner<Runner>
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.
| 嵌套类摘要 | |
|---|---|
static interface |
Suite.SuiteClasses
The SuiteClasses annotation specifies the classes to be run when a class
annotated with @RunWith(Suite.class) is run. |
| 构造器摘要 | |
|---|---|
protected |
Suite(Class<?> klass,
Class<?>[] suiteClasses)
Call this when the default builder is good enough. |
protected |
Suite(Class<?> klass,
List<Runner> runners)
Called by this class and subclasses once the runners making up the suite have been determined |
|
Suite(Class<?> klass,
org.junit.runners.model.RunnerBuilder builder)
Called reflectively on classes annotated with @RunWith(Suite.class) |
|
Suite(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 |
Suite(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 |
| 方法摘要 | |
|---|---|
protected Description |
describeChild(Runner child)
Returns a Description for child, which can be assumed to
be an element of the list returned by ParentRunner.getChildren() |
static Runner |
emptySuite()
Returns an empty suite. |
protected List<Runner> |
getChildren()
Returns a list of objects that define the children of this Runner. |
protected void |
runChild(Runner runner,
RunNotifier notifier)
Runs the test corresponding to child, which can be assumed to be
an element of the list returned by ParentRunner.getChildren(). |
| 类方法继承: org.junit.runners.ParentRunner |
|---|
childrenInvoker, classBlock, collectInitializationErrors, filter, getDescription, getName, getTestClass, run, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses |
| 类方法继承: org.junit.runner.Runner |
|---|
testCount |
| 类方法继承: java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造器详细信息 |
|---|
Suite
public Suite(Class<?> klass, org.junit.runners.model.RunnerBuilder builder) throws org.junit.runners.model.InitializationError
- Called reflectively on classes annotated with
@RunWith(Suite.class)- 参数:
klass- the root classbuilder- builds runners for classes in the suite- 抛出异常:
org.junit.runners.model.InitializationError
Suite
public Suite(org.junit.runners.model.RunnerBuilder builder,
Class<?>[] classes)
throws org.junit.runners.model.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 suiteclasses- the classes in the suite- 抛出异常:
org.junit.runners.model.InitializationError
Suite
protected Suite(Class<?> klass, Class<?>[] suiteClasses) throws org.junit.runners.model.InitializationError
- Call this when the default builder is good enough. Left in for compatibility with JUnit 4.4.
- 参数:
klass- the root of the suitesuiteClasses- the classes in the suite- 抛出异常:
org.junit.runners.model.InitializationError
Suite
protected Suite(org.junit.runners.model.RunnerBuilder builder,
Class<?> klass,
Class<?>[] suiteClasses)
throws org.junit.runners.model.InitializationError
- Called by this class and subclasses once the classes making up the suite have been determined
- 参数:
builder- builds runners for classes in the suiteklass- the root of the suitesuiteClasses- the classes in the suite- 抛出异常:
org.junit.runners.model.InitializationError
Suite
protected Suite(Class<?> klass, List<Runner> runners) throws org.junit.runners.model.InitializationError
- Called by this class and subclasses once the runners making up the suite have been determined
- 参数:
klass- root of the suiterunners- for each class in the suite, aRunner- 抛出异常:
org.junit.runners.model.InitializationError
| 方法详细信息 |
|---|
emptySuite
public static Runner emptySuite()
- Returns an empty suite.
getChildren
protected List<Runner> getChildren()
- Description copied from class:
ParentRunner - Returns a list of objects that define the children of this Runner.
- 规范说明:
getChildrenin classParentRunner<Runner>
describeChild
protected Description describeChild(Runner child)
- Description copied from class:
ParentRunner - Returns a
Descriptionforchild, which can be assumed to be an element of the list returned byParentRunner.getChildren() - 规范说明:
describeChildin classParentRunner<Runner>
runChild
protected void runChild(Runner runner, RunNotifier notifier)
- Description copied from class:
ParentRunner - Runs the test corresponding to
child, which can be assumed to be an element of the list returned byParentRunner.getChildren(). Subclasses are responsible for making sure that relevant test events are reported throughnotifier - 规范说明:
runChildin classParentRunner<Runner>
|
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: NESTED | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 | ||||||||
