Class SpringJUnit4ClassRunner

All Implemented Interfaces:
Describable, Filterable, Orderable, Sortable
Direct Known Subclasses:
SpringRunner

public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner
SpringJUnit4ClassRunner is a custom extension of JUnit's BlockJUnit4ClassRunner which provides functionality of the Spring TestContext Framework to standard JUnit tests by means of the TestContextManager and associated support classes and annotations.

To use this class, simply annotate a JUnit 4 based test class with @RunWith(SpringJUnit4ClassRunner.class) or @RunWith(SpringRunner.class).

The following list constitutes all annotations currently supported directly or indirectly by SpringJUnit4ClassRunner. (Note that additional annotations may be supported by various TestExecutionListener or TestContextBootstrapper implementations.)

If you would like to use the Spring TestContext Framework with a runner other than this one, use SpringClassRule and SpringMethodRule.

NOTE: As of Spring Framework 4.3, this class requires JUnit 4.12 or higher.

Since:
2.5
Author:
Sam Brannen, Juergen Hoeller
See Also: