Search code examples
javajunitjunit4jboss-arquillian

JUnit @Ignore all other tests (@IgnoreOther ?)


I'm testing extensively with JUnit and sometimes - while debugging my code - I want (temporary) only run a single @Test of my @RunWith(Arquillian.class) test class. Currently I'm adding a @Ignore to all other tests and wondering if something like @IgnoreOther does exist.

Are there better solutions to ignore all other tests?


Solution

  • Test rules (JUnit 4.7+) will help. For example, you can write a rule that ignores all @Test methods except one with a specific name.