I have a set of really slow tests, which take a week to run. (They literally run some code non-stop for about a week).
Naturally, no developer (or even the default build
This works by default, in Maven, IntelliJ and Eclipse:
import static org.junit.Assume.assumeTrue;
@Test
public void mySlowTest() {
assumeTrue("true".equals(System.getProperty("runSlowTests")));
...
}
To run them anyway, simply add VM argument -DrunSlowTests=true
.
Semantically speaking, it's totally wrong. But it works :)