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

loadContext

val loadContext: Boolean

Whether the ApplicationContext associated with the current test should be eagerly loaded in order to evaluate the #expression.

Defaults to false so that test application contexts are not eagerly loaded unnecessarily. If an expression is based solely on system properties or environment variables or does not interact with beans in the test's application context, there is no need to load the context prematurely since doing so would be a waste of time if the test ends up being disabled.

See Also
#expression