I have 2 test methods, and i need to run them with different configurations
myTest() { ..... ..... } @Test myTest_c1() { setConf1(); myTest(); } @Test myTest_c2() { setConf2(); myTest(); } //------------------ nextTest() { ..... ..... } @Test nextTest_c1() { setConf1(); nextTest(); } @Test nextTest_c2() { setConf2(); nextTest(); } I cannot run them both from one config (as in code below) because i need separate methods for tosca execution.
@Test tests_c1() { setConf1(); myTest() nextTest(); } I don't want to write those 2 methods to run each test, how can i solve this?
First i thought to write custom annotation
@Test @RunWithBothConf myTest() { .... } But maybe there are any other solutions for this?