Introduction

Version 0.2.0 Updated Dec 08, 2025

Behaviour‑Driven Development (BDD) is a collaborative practice that emphasizes a shared understanding of software behaviour across roles. The design of rstest‑bdd integrates BDD concepts with the Rust testing ecosystem. BDD encourages collaboration between developers, quality-assurance specialists, and non-technical business participants by describing system behaviour in a natural, domain‑specific language. rstest‑bdd achieves this without introducing a bespoke test runner; instead, it builds on the rstest crate so that unit tests and high‑level behaviour tests can co‑exist and run under cargo test. The framework reuses rstest fixtures for dependency injection and uses a procedural macro to bind tests to Gherkin scenarios, ensuring that functional tests live alongside unit tests and benefit from the same tooling.

This guide explains how to consume rstest‑bdd at the current stage of development. It relies on the implemented code rather than on aspirational features described in the design documents. Where the design proposes advanced behaviour, the implementation status is noted. Examples and explanations are organized by the so‑called three amigos of BDD: the business analyst/product owner, the developer, and the tester.