Crate rstest_bdd_macros

Crate rstest_bdd_macros 

Source
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; implies compile-time-validation.

Both features are disabled by default.

Macros§

scenarios
Discover all .feature files under the given directory and generate one test per Gherkin Scenario.

Attribute Macros§

given
Attribute macro registering a step definition for the Given keyword.
scenario
Attribute macro binding a test function to a single Gherkin scenario.
then
Attribute macro registering a step definition for the Then keyword.
when
Attribute macro registering a step definition for the When keyword.

Derive Macros§

DataTable
Derive DataTable for tuple structs wrapping collections of rows.
DataTableRow
Derive DataTableRow for structs that should parse Gherkin rows.
ScenarioState
Derive ScenarioState for a type that shares context across steps.
StepArgs
Derive StepArgs for a struct whose fields map to pattern placeholders.