Package org.junit.jupiter.api.condition
Annotation Type DisabledIfEnvironmentVariable
-
@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented @ExtendWith(org.junit.jupiter.api.condition.DisabledIfEnvironmentVariableCondition.class) @API(status=STABLE, since="5.1") public @interface DisabledIfEnvironmentVariable
@DisabledIfEnvironmentVariable
is used to signal that the annotated test class or test method is disabled if the value of the specified environment variable matches the specified regular expression.When declared at the class level, the result will apply to all test methods within that class as well.
If the specified environment variable is undefined, the presence of this annotation will have no effect on whether or not the class or method is disabled.
- Since:
- 5.1
- See Also:
Disabled
,EnabledIf
,EnabledIfEnvironmentVariable
,EnabledIfSystemProperty
,EnabledOnJre
,EnabledOnOs
,DisabledIf
,DisabledIfSystemProperty
,DisabledOnJre
,DisabledOnOs
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
matches
A regular expression that will be used to match against the retrieved value of thenamed()
environment variable.java.lang.String
named
The name of the environment variable to retrieve.
-
-
-
-
matches
java.lang.String matches
A regular expression that will be used to match against the retrieved value of thenamed()
environment variable.- Returns:
- the regular expression; never blank
- See Also:
String.matches(String)
,Pattern
-
-