I have a situation where I have something like the following:
public class SomeTest extends AbstractMyTest {
@Test
public void something() {
}
@Override
public String getConfiguration() {
return "myConfigFile.ini";
}
}
public abstract class AbstractMyTest {
@Before
public void before() {
}
abstract String getConfiguration();
}
Now I'm considering getting rid of the AbstractMyTest class and having something like the following:
@MyTestConfig(value="myConfigFile.ini")
public class SomeTest {
@Test
public void something() {
}
}
So, I can have a custom Runner that does what the AbstractMyTest class responds to. I would like to be able to do some things in @BeforeClass or @Before, without having to do this in every TestClass. How will such a runner be structured?
source
share