Package spock.lang
package spock.lang
The core specification language.
-
ClassDescriptionAutomatically cleans up the object stored in the annotated field or property at the end of its life time.Allows to set the execution mode.Indicates that a feature method is expected to fail with the given exception.Indicates that a specification or feature method should not be run.Ignores the annotated spec, feature or selected iterations if the given condition holds.Indicates that all feature methods except the ones carrying this annotation should be ignored.Allows the isolated execution of a Specification.Indicates that a feature method or specification relates to one or more issues in an external issue tracking system.Allows to attach a natural-language description to a spec.Indicates that the feature is not fully implemented yet and should not be reported as error.Marks the annotated feature or selected iterations as
PendingFeatureif the given condition holds.Repeats a feature until it fails or the maximum number of repetitions is reached.Ignores the annotated spec, feature or selected iterations unless the given condition holds.Allows to control access to a shared resource.Retries the given feature if an exception occurs during execution of the feature method.Indicates that iterations of a data-driven feature should not be made visible as separate features to the outside world (IDEs, reports, etc.) but as one atomic test.One or more references to external information related to a specification or feature.Indicates that a field is shared among all feature methods in a specification.Injects aSnapshotterinstance into a field or parameter.Allows to perform snapshot testing.Base class for Spock specifications.When applied to a spec, the annotation indicates that the spec's feature methods should be run sequentially in their declared order (even in the presence of a parallel spec runner), always starting from the first method.Indicates which objects/classes are the subjects of a specification.Generate a temp directory for test, and delete it after test.Indicates that the execution of a method should time out after the given duration has elapsed.Allows to attach a natural-language name to a spec.Indicates that iterations of a data-driven feature should be made visible as separate features to the outside world (IDEs, reports, etc.).Indicates that the code blocks of the annotated methods may contain conditions, allowing to omit theassertkeyword.Indicates that the code blocks of the annotated methods may contain conditions, allowing to omit theassertkeyword.