How can I initialize a Spring applicationContext just once for all tests
I have a set of tests based which need a spring context. For fast test execution I want to make sure that the Spring context is initialized just once, then all the tests should be run against this context, then it should shut down. I already tried the following approaches: Use @RunWith(SpringJUnit4ClassRunner.class) and @ContextConfiguration(MyAnnotatedConfig.class) to initialize the spring context Use a @RunWith(SpringJUnit4ClassRunner.class) and @TestExecutionListeners({MyTestExecutionListener.class}) with a handwritten test execution listener that initializes the spring context and injects