Expand description
Attribute macros enabling Behaviour-Driven testing with rstest.
§Feature flags
compile-time-validation: registers steps at compile time and attaches spans for diagnostics.strict-compile-time-validation: escalates missing or ambiguous steps to compile errors; impliescompile-time-validation.
Both features are disabled by default.
Macros§
- scenarios
- Discover all
.featurefiles under the given directory and generate one test per GherkinScenario.
Attribute Macros§
- given
- Attribute macro registering a step definition for the
Givenkeyword. - scenario
- Attribute macro binding a test function to a single Gherkin scenario.
- then
- Attribute macro registering a step definition for the
Thenkeyword. - when
- Attribute macro registering a step definition for the
Whenkeyword.
Derive Macros§
- Data
Table - Derive
DataTablefor tuple structs wrapping collections of rows. - Data
Table Row - Derive
DataTableRowfor structs that should parse Gherkin rows. - Scenario
State - Derive
ScenarioStatefor a type that shares context across steps. - Step
Args - Derive
StepArgsfor a struct whose fields map to pattern placeholders.