JUnit: Multiple Runners and Dependent Tests
repost from https://bekce.github.io/junit-multiple-runwith-dependent-tests/ This way works for me, but in my scenario, the child test class need to access the parent's methods, which does not work under this solution. There are times that you may want to run a test case with multiple @RunWith annotations or you may have a bootstrap test class that you must run before every other test, such as bootstrapping the application during integration testing. JUnit by its nature does not have test class chaining but there is an easy solution. In this example I will mention SpringJUnit4ClassRunner which is used to bootstrap a Spring context, which is handy for integration testing, but this method applies to every case for JUnit, not just Spring. We also use CasperRunner to run CasperJS tests. However, CasperJS tests must run after the context has been initialized, and this order is not deterministic in JUnit. @RunWith ( Sp...