Package org.junit.jupiter.api.condition
Annotation Type EnabledIfEnvironmentVariable
-
@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented @ExtendWith(org.junit.jupiter.api.condition.EnabledIfEnvironmentVariableCondition.class) @API(status=STABLE, since="5.1") public @interface EnabledIfEnvironmentVariable@EnabledIfEnvironmentVariableis used to signal that the annotated test class or test method is only enabled 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 annotated class or method will be disabled.
- Since:
- 5.1
- See Also:
Disabled,EnabledIf,EnabledIfSystemProperty,EnabledOnJre,EnabledOnOs,DisabledIf,DisabledIfEnvironmentVariable,DisabledIfSystemProperty,DisabledOnJre,DisabledOnOs
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.StringmatchesA regular expression that will be used to match against the retrieved value of thenamed()environment variable.java.lang.StringnamedThe 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
-
-