@Beta @Retention(value=RUNTIME) @Target(value=METHOD) @Repeatable(value=PendingFeatureIf.Container.class) public @interface PendingFeatureIf
PendingFeature
if the
given condition holds. Otherwise it will be treated like a normal feature or iteration.
The configured closure is called with a delegate of type PreconditionContext
which provides access to system properties, environment variables, the type
of operating system and JVM.
If applied to a data driven feature, the closure can also access the data variables. If the closure does not reference any actual data variables, the whole feature is deemed pending and only if all iterations become successful will be marked as failing. But if the closure actually does reference valid data variables, the individual iterations where the condition holds are deemed pending and each will individually fail as soon as it would be successful without this annotation.
PreconditionContext
Modifier and Type | Required Element and Description |
---|---|
Class<? extends Closure> |
value
If this condition holds true, the feature will be considered "Pending"
and will behave the same way as if it were annotated as a
PendingFeature |
Modifier and Type | Optional Element and Description |
---|---|
Class<? extends Throwable>[] |
exceptions
Configures which types of Exceptions are expected in the pending feature.
|
String |
reason
The reason why this feature is pending
|
public abstract Class<? extends Closure> value
PendingFeature
If the condition is false, it will not be treated as pending
public abstract String reason