程序包 org.junit.runners
Provides standard
Runner
implementations.- 从以下版本开始:
- 4.0
- 另请参阅:
Runner
,BlockJUnit4ClassRunner
类概要 类 说明 AllTests Runner for use with JUnit 3.8.x-style AllTests classes (those that only implement a staticsuite()
method).BlockJUnit4ClassRunner Implements the JUnit 4 standard test case class model, as defined by the annotations in the org.junit package.JUnit4 Aliases the current default JUnit 4 class runner, for future-proofing.Parameterized The custom runnerParameterized
implements parameterized tests.ParentRunner<T> Provides most of the functionality specific to a Runner that implements a "parent node" in the test tree, with children defined by objects of some data typeT
.Suite UsingSuite
as a runner allows you to manually build a suite containing tests from many classes.枚举概要 枚举 说明 MethodSorters Sort the methods into a specified execution order.注释类型概要 注释类型 说明 Parameterized.Parameter Annotation for fields of the test class which will be initialized by the method annotated byParameters
.Parameterized.Parameters Annotation for a method which provides parameters to be injected into the test class constructor byParameterized
.Parameterized.UseParametersRunnerFactory Add this annotation to your test class if you want to generate a special runner.Suite.SuiteClasses TheSuiteClasses
annotation specifies the classes to be run when a class annotated with@RunWith(Suite.class)
is run.