OnlyIf
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:
suite("Suite name", OnlyIf { System.getProperty("foo") != null }) {
// …
}Content copied to clipboard
Only execute a test if a JVM property is enabled:
test("Some kind of test", OnlyIf { System.getProperty("foo") != null }) {
// …
}Content copied to clipboard
See also
Ignore a test or suite.
Conditionally ignore a test or suite.