I have found so far 2 ways to setup JUnit test timeout. Either using:
@Test(timeout=XXX)
Or using something like:
@ClassRule
public static Timeout timeoutRule = new Timeout(XXX, TimeUnit.MILLISECONDS);
In my case, I have a Test Runner as a main class to run all my test suites, so I can execute the tests as an executable jar. I'd like this runner to setup the timeouts dinamically using reflection.
Is it possible to do?
Aucun commentaire:
Enregistrer un commentaire