SpringJUnit4ClassRunner
is a custom extension of {@link BlockJUnit4ClassRunner} which provides functionality of theSpring TestContext Framework to standard JUnit 4.5+ tests by means of the {@link TestContextManager} and associated support classes andannotations.
The following list constitutes all annotations currently supported directly by SpringJUnit4ClassRunner
. (Note that additional annotations may be supported by various {@link org.springframework.test.context.TestExecutionListener TestExecutionListeners})
- {@link Test#expected() @Test(expected=...)}
- {@link ExpectedException @ExpectedException}
- {@link Test#timeout() @Test(timeout=...)}
- {@link Timed @Timed}
- {@link Repeat @Repeat}
- {@link Ignore @Ignore}
- {@link org.springframework.test.annotation.ProfileValueSourceConfiguration @ProfileValueSourceConfiguration}
- {@link org.springframework.test.annotation.IfProfileValue @IfProfileValue}
NOTE: As of Spring 3.0, SpringJUnit4ClassRunner
requires JUnit 4.5+.
@author Sam Brannen
@author Juergen Hoeller
@since 2.5
@see TestContextManager