> For the complete documentation index, see [llms.txt](https://bernardo.gitbook.io/development-docs-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bernardo.gitbook.io/development-docs-java/testing/junit/disable-tests.md).

# Disable Tests

To disable a test make use of the @Ignore/@Disabled annotation (Junit 4/5).

JUnit will report all the ignored tests. If they are commented, or the test annotations are removed, there is no way to know which tests have been disabled.

## Ignoring a Single Test

### Junit 4

```java
public final class TestSuite {

   @Ignore
   @Test
   public final void testCase() {
   }

}
```

### Junit 5

```java
public final class TestSuite {

   @Disabled
   @Test
   public final void testCase() {
   }

}
```

## Ignoring a Full Suite

Just apply the annotation to the class.

```java
@Ignore
public final class TestSuite {

   @Test
   public final void testCase() {
   }

}
```
