Class SpringRunner
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
org.springframework.test.context.junit4.SpringRunner
- All Implemented Interfaces:
Describable, Filterable, Orderable, Sortable
Deprecated.
SpringRunner is an alias for the SpringJUnit4ClassRunner.
To use this class, annotate a JUnit 4 based test class with
@RunWith(SpringRunner.class).
If you would like to use the Spring TestContext Framework with a runner other than
this one, use SpringClassRule
and SpringMethodRule.
NOTE: This class requires JUnit 4.12 or higher.
- Since:
- 4.3
- Author:
- Sam Brannen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpringRunner(Class<?> clazz) Deprecated.Construct a newSpringRunnerand initialize aTestContextManagerto provide Spring testing functionality to standard JUnit 4 tests. -
Method Summary
Methods inherited from class SpringJUnit4ClassRunner
createTest, createTestContextManager, getDescription, getExpectedException, getJUnitTimeout, getSpringTimeout, getTestContextManager, isTestMethodIgnored, methodBlock, possiblyExpectingExceptions, run, runChild, withAfterClasses, withAfters, withAfterTestExecutionCallbacks, withBeforeClasses, withBefores, withBeforeTestExecutionCallbacks, withPotentialRepeat, withPotentialTimeoutMethods inherited from class BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodInvoker, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructorMethods inherited from class ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getName, getRunnerAnnotations, getTestClass, order, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withInterruptIsolation
-
Constructor Details
-
SpringRunner
Deprecated.Construct a newSpringRunnerand initialize aTestContextManagerto provide Spring testing functionality to standard JUnit 4 tests.- Parameters:
clazz- the test class to be run- Throws:
InitializationError- See Also:
-
SpringExtensionand JUnit Jupiter