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

expression

@AliasFor("value") val expression: String

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

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

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 @DisabledIf("true") is equivalent to @Disabled and @DisabledIf("false") is logically meaningless.

See Also
#reason#loadContext#value