spring-framework / org.springframework.test.context.junit.jupiter / EnabledIf / expression

expression

@AliasFor("value") val expression: String

The expression that will be evaluated to determine if the annotated test class or test method is enabled.

If the expression evaluates to Boolean#TRUE or a String equal to "true" (ignoring case), the test will be enabled.

Expressions can be any of the following.

Note, however, that a text literal which is not the result of dynamic resolution of a property placeholder is of zero practical value since @EnabledIf("false") is equivalent to @Disabled and @EnabledIf("true") is logically meaningless.

See Also
#reason#loadContext#value