Search⌘ K

Test Execution Conditions

Understand how to manage test execution in JUnit 5 by exploring built-in ExecutionCondition extensions and creating custom conditions. Learn to disable tests selectively using tags, system properties, and runtime controls to customize your test runs effectively.

We'll cover the following...

Multiple annotations

We discussed the @Disabled annotation to disable test classes or methods. It’s actually implemented as a built-in extension of ExecutionCondition. This ExecutionCondition can be evaluated before the execution of each test class or test method to determine if the test class or method should be executed. It has only one method, ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context), at line ...