OnlyIf¶
inline fun OnlyIf(predicate: () -> Boolean): TestConfig
Executes this test or ensuite suite only if predicate returns true.
Conceptually, this is the opposite of Ignored.If.
Example¶
Only execute a suite if a JVM property is enabled:
Only execute a test if a JVM property is enabled:
See also¶
-
Ignored: Ignore a test or suite. -
Ignored.If: Conditionally ignore a test or suite.