Top Description Methods
org.junit.jupiter.api

public @Interface Disabled

extends Annotation
Annotations
@Target:TYPE, METHOD
@Retention:RUNTIME
@Documented
@API
status:STABLE
since:5.0
Static Imports
org.apiguardian.api.API.Status.STABLE

@Disabled is used to signal that the annotated test class or test method is currently disabled and should not be executed.

@Disabled may optionally be declared with a reason to document why the annotated test class or test method is disabled.

When applied at the class level, all test methods within that class are automatically disabled as well.

This annotation is not @Inherited. Consequently, if you wish to apply the same semantics to a subclass, this annotation must be redeclared on the subclass.

If a test method is disabled via this annotation, that prevents execution of the test method and method-level lifecycle callbacks such as @BeforeEach methods, @AfterEach methods, and corresponding extension APIs. However, that does not prevent the test class from being instantiated, and it does not prevent the execution of class-level lifecycle callbacks such as @BeforeAll methods, @AfterAll methods, and corresponding extension APIs.

Since
5.0
See Also
value, org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable, org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable, org.junit.jupiter.api.condition.EnabledIfSystemProperty, org.junit.jupiter.api.condition.DisabledIfSystemProperty, org.junit.jupiter.api.condition.EnabledOnJre, org.junit.jupiter.api.condition.DisabledOnJre, org.junit.jupiter.api.condition.EnabledForJreRange, org.junit.jupiter.api.condition.DisabledForJreRange, org.junit.jupiter.api.condition.EnabledOnOs, org.junit.jupiter.api.condition.DisabledOnOs, org.junit.jupiter.api.condition.EnabledInNativeImage, org.junit.jupiter.api.condition.DisabledInNativeImage, org.junit.jupiter.api.extension.ExecutionCondition

Method Summary

Modifier and TypeMethod and Description
public String
value()

The reason this annotated test class or test method is disabled.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

The reason this annotated test class or test method is disabled.