Interface ExecutionCondition
-
- All Superinterfaces:
Extension
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @API(status=STABLE, since="5.0") public interface ExecutionCondition extends ExtensionExecutionConditiondefines theExtensionAPI for programmatic, conditional test execution.An
ExecutionConditionis evaluated to determine if a given container or test should be executed based on the suppliedExtensionContext.If an
ExecutionConditiondisables a test method, that prevents execution of the test method and method-level lifecycle callbacks such as@BeforeEachmethods,@AfterEachmethods, 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@BeforeAllmethods,@AfterAllmethods, and corresponding extension APIs.Constructor Requirements
Consult the documentation in
Extensionfor details on constructor requirements.- Since:
- 5.0
- See Also:
Disabled,EnabledIf,DisabledIf,EnabledOnOs,DisabledOnOs,EnabledOnJre,DisabledOnJre,EnabledForJreRange,DisabledForJreRange,EnabledInNativeImage,DisabledInNativeImage,EnabledIfSystemProperty,DisabledIfSystemProperty,EnabledIfEnvironmentVariable,DisabledIfEnvironmentVariable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConditionEvaluationResultevaluateExecutionCondition(ExtensionContext context)Evaluate this condition for the suppliedExtensionContext.
-
-
-
Method Detail
-
evaluateExecutionCondition
ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context)
Evaluate this condition for the suppliedExtensionContext.An enabled result indicates that the container or test should be executed; whereas, a disabled result indicates that the container or test should not be executed.
- Parameters:
context- the current extension context; nevernull- Returns:
- the result of evaluating this condition; never
null
-
-