What is the difference between SpringJUnit4ClassRunner and SpringRunner
Source URL: https://stackoverflow.com/a/50522420
.
@RunWith(SpringRunner.class)
tells JUnit to run using Spring’s testing support.SpringRunner
is the new name forSpringJUnit4ClassRunner
, it’s just a bit easier on the eye.
SpringRunner
is only available on spring-test 4.3.
SpringRunner
class extendsSpringJUnit4ClassRunner
.Source code of
SpringRunner
is
package org.springframework.test.context.junit4; import org.junit.runners.model.InitializationError; public final class SpringRunner extends SpringJUnit4ClassRunner { public SpringRunner(Class<?> clazz) throws InitializationError { super(clazz); } }
.
No comments:
Post a Comment