Cucumber.Runtime (Cucumber v0.9.0)
View SourceRuntime execution of cucumber steps.
This module handles the step execution lifecycle within a running test:
- Each step's text is matched against the step registry to find a definition
- Cucumber Expressions are used to extract typed parameters from step text
- The step function is invoked with context containing extracted
args, optionaldatatable, and optionaldocstring - Step return values are processed to update the shared context:
:okkeeps context unchanged- A map is merged into context
- A keyword list is converted to a map and merged
{:ok, data}unwraps and merges{:error, reason}fails the step
- On failure, enhanced error messages are generated with step history, file locations, and formatted assertion details
Summary
Functions
Executes a step with the given context and step registry.
Functions
@spec execute_step(map(), Gherkin.Step.t(), map()) :: map()
Executes a step with the given context and step registry.