Skip to main content

Annotations

tip

Use annotations in meta and avoid them in features where possible.

AnnotationLevel(s)SinceDescription
@StepDefScenariov1.0.0Turns a Gherkin Scenario into a callable step definition
@ImportFeature
Meta
v1.9.0Loads specific meta files into a feature (or another meta) without relying on automatic discovery or other mechanisms
@SynchronizedStepDefv2.26.0Ensures that only one thread can call a StepDef at any one time during parallel execution
@SynchronisedStepDefv2.26.0Same as a @Synchronized above but with AU spelling instead
@DataTableStepDefv2.47.0Associates a step definition with a Gherkin data table
@ForEachStepDefv2.47.0Iterates over the records of a Gherkin data table
@ExamplesScenario Outlinev2.4.0Imports data from a CSV file into an examples table in a Scenario Outline
@ContextStepDefv2.41.0Assigns context behavior to a step definition so it can only be called by Given steps
@ActionStepDefv2.41.0Assigns action behavior to a step definition so it can only be called by When steps
@AssertionStepDefv2.41.0Assigns assertion behavior to a step definition so it can only be called by Then steps
@MessageStepv3.31.12Overrides the default error message for a failed assertion with a custom one
@TryStepv3.11.0Instructs Gwen to ignore a failed step and continue procesing
@FinallyStepv3.3.0Forces the last step in a Scenario to always execute even when prior ones fail or are skipped
@EagerStepv3.9.0Immediately evaluates and assigns values to refereces in place instead of at each call site
@LazyStepv3.9.0Evaluates and assigns values to refereces when they are first used at a call site only
@BreakpointStepv3.2.0Pauses execution on a step when Gwen is launched in debug mode
@HardStepv3.43.0Reports an assertion error occurring in a step, raises it as a failure and skips further processing
@SoftStepv3.43.0Reports an assertion error occurring in a step, raises it as failure and continues processing
@SustainedStepv3.43.0Reports an assertion error occurring in a step without raising it as a failure and continues processing
@DryRunStepv3.55.0Forces references to take on certain given values when evaluated in dry runs
@MaskedStepv3.67.0Masks (hides) the value returned by a data binding
@ParallelExamplesv3.69.0Executes expanded examples in outlines in parallel
@TimeoutStepv3.73.0Specifies a timeout period on a wait, until/while, for each, assertion or locator DSL step. Examples: @Timeout('10s'), @Timeout('2m30s'), @Timeout('2m')
@DelayStepv3.73.0Specifies a delay interval on a wait, until/while DSL step. Examples: @Delay('2s'), @Delay('1s500ms'), @Delay('1m')
@ResultsFeature
Rule
Scenario
StepDef
Scenario Outline
Examples
v3.77.0Generates CSV results for a gherkin node
@TrimStepv3.62.0Trims strings when performing comparison operations
@IgnoreCaseStepv3.62.0Ignores case when performing comparison operations
@IgnoreFeature
Scenario
Rule
Background
Examples
v1.0.0Ignores and skips over a Gherkin block/node to avoid evaluation