| Crates.io | cargo-bdd |
| lib.rs | cargo-bdd |
| version | 0.4.0 |
| created_at | 2025-09-30 21:50:33.016134+00 |
| updated_at | 2026-01-22 22:19:32.052145+00 |
| description | Diagnostic tooling for rstest-bdd |
| homepage | https://github.com/leynos/rstest-bdd |
| repository | https://github.com/leynos/rstest-bdd |
| max_upload_size | |
| id | 1861777 |
| size | 83,515 |
Where Rustaceans send their step library for a health inspection.
TL;DR:
cargo bddis the nosy cousin ofrstest-bdd. It builds every test target withcargo test --no-run, reruns the binaries withRSTEST_BDD_DUMP_STEPS=1 --dump-steps, and reports what your steps get up to.
unused highlights steps that never executed during
that run so you can prune them before they rot.duplicates groups identical keyword+pattern pairs so
you can refactor instead of playing whack-a-mole.cargo: no bespoke runner, no sidecar daemon—just another
subcommand that speaks the same toolchain dialect as the rest of your tests.Think of it as the kitchen inspector for your courgette-driven development setup: it will politely tap every saucepan and make sure no scenario is serving mouldy leftovers.
cargo bdd steps — prints every registered step with its keyword, pattern,
and source location.cargo bdd unused — lists steps flagged used = false in that same process
execution.cargo bdd duplicates — groups definitions that share both keyword and
pattern, separating each duplicate set with ---.The user’s guide showcases invocations such as cargo bdd unused --quiet and
cargo bdd duplicates --json. Follow your local appetite for formatting when
consuming the raw output.
cargo test --no-run --message-format=json --all-features.RSTEST_BDD_DUMP_STEPS=1 --dump-steps to make
it spill a JSON inventory of registered steps.Any binary that crashes without recognising --dump-steps is politely skipped
(the tool assumes it simply is not an rstest-bdd test). Binaries that fail
for other reasons cause the subcommand to error, so you still notice genuinely
broken builds.
unused results—the flag is
per-process, so only steps exercised during that diagnostic run count as
“used”.#[scenario] tests compiling even when you are mid-refactor; the
subcommand leans on cargo test --no-run, so red builds mean no diagnostics.rstest-bdd instrumentation; the tool shrugs and moves on.rstest-bdd in the
crate you are probing.For deeper lore—including how fixtures bind to steps, why the registry cares
about used, and the philosophy behind keeping BDD inside the Rust testing
stack—curl up with docs/users-guide.md.
Now go forth, interrogate your steps, and may every duplicate be composted into fresh behaviour.