Back to Intellij Community

IgnoredJUnitTest

plugins/junit/resources/inspectionDescriptions/IgnoredJUnitTest.html

2025.3-rc-2545 B
Original Source

Reports usages of JUnit 4's @Ignore or JUnit 5's @Disabled annotations. It is considered a code smell to have tests annotated with these annotations for a long time, especially when no reason is specified.

Example:

@Ignore
  public class UrgentTest {

    @Test
    public void testIt() {
      Assert.assertEquals("expected", "actual");
    }
  }

Configure the inspection:

  • Use the Only report annotations without reason option to only report the cases when no reason is specified as the annotation's value attribute.