Package org.junit
Annotation Type Ignore
-
@Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface IgnoreSometimes you want to temporarily disable a test or a group of tests. Methods annotated withTestthat are also annotated with@Ignorewill not be executed as tests. Also, you can annotate a class containing test methods with@Ignoreand none of the containing tests will be executed. Native JUnit 4 test runners should report the number of ignored tests along with the number of tests that ran and the number of tests that failed.For example:
@Ignore @Test public void something() { ...@Ignore takes an optional default parameter if you want to record why a test is being ignored:@Ignore("not ready yet") @Test public void something() { ...@Ignore can also be applied to the test class:@Ignore public class IgnoreMe { @Test public void test1() { ... } @Test public void test2() { ... } }- Since:
- 4.0
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringvalueThe optional reason why the test is ignored.
-