I wish to launch the GUI application 2 times from Java test. How should we use @annotation
in this case?
public class Toto {
@BeforeClass
public static void setupOnce()
{
final Thread thread = new Thread() { public void run()
{ //launch appli } };
try {
thread.start();
} catch (Exception ex) { }
}
public class Test extends toto {
@Test
public void test() {
setuptonce();
closeAppli();
}
@test
public void test2()
{ setuptonce();
}
}
To launch it a second time, which annotation should I use? @afterclass
?