001package org.junit; 002 003import java.lang.annotation.ElementType; 004import java.lang.annotation.Retention; 005import java.lang.annotation.RetentionPolicy; 006import java.lang.annotation.Target; 007 008/** 009 * Sometimes you want to temporarily disable a test or a group of tests. Methods annotated with 010 * {@link org.junit.Test} that are also annotated with <code>@Ignore</code> will not be executed as tests. 011 * Also, you can annotate a class containing test methods with <code>@Ignore</code> and none of the containing 012 * tests will be executed. Native JUnit 4 test runners should report the number of ignored tests along with the 013 * number of tests that ran and the number of tests that failed. 014 * 015 * <p>For example: 016 * <pre> 017 * @Ignore @Test public void something() { ... 018 * </pre> 019 * @Ignore takes an optional default parameter if you want to record why a test is being ignored: 020 * <pre> 021 * @Ignore("not ready yet") @Test public void something() { ... 022 * </pre> 023 * @Ignore can also be applied to the test class: 024 * <pre> 025 * @Ignore public class IgnoreMe { 026 * @Test public void test1() { ... } 027 * @Test public void test2() { ... } 028 * } 029 * </pre> 030 * 031 * @since 4.0 032 */ 033@Retention(RetentionPolicy.RUNTIME) 034@Target({ElementType.METHOD, ElementType.TYPE}) 035public @interface Ignore { 036 /** 037 * The optional reason why the test is ignored. 038 */ 039 String value() default ""; 040}