The 6 Stages of the BDD Lifecycle
BDD is a collaborative cycle where teams move from high-level business goals to implemented features through conversation and concrete examples. This flow ensures everyone shares the same understanding.
1. Speculate
The team and business stakeholders discuss high-level goals. They ask "Why are we doing this?" and speculate on features that might deliver business value.
Output: Product Backlog, Goals
2. Illustrate
Using concrete examples and conversations, the team builds a deeper understanding of a feature. Techniques like Example Mapping help clarify business rules.
Output: User Stories with Acceptance Criteria
3. Formulate
Key examples are transformed into a structured, business-readable format like Gherkin's `Given/When/Then`. These become executable specifications.
Output: Executable Specifications
4. Automate
Developers and testers turn the executable specifications into automated acceptance tests. These tests initially fail and drive the development process.
Output: Automated Tests
5. Demonstrate
Passing tests act as evidence that a feature is correctly implemented. They become "living documentation" that illustrates how the system works.
Output: Passing Tests & Documentation
6. Validate
The team and business validate if the feature delivers the promised business value in the real world, providing feedback for the next cycle.
Output: Shippable Product Increment
From Conversation to Code
BDD provides a clear path from a high-level business idea down to the implementation details, ensuring every piece of code is tied to business value.
The Two Loops of Development
BDD operates on two interconnected cycles. The outer "BDD loop" is driven by business-facing scenarios (acceptance tests). To make one scenario pass, developers enter the inner "TDD loop," writing many small unit tests to build the required functionality piece by piece.
BDD as Living Documentation
Because tests are written in a business-readable language and are always in sync with the code, the test reports become "living documentation." This provides a reliable, up-to-date view of the system's capabilities and progress.
Overall Test Status
Functional Coverage
Collaboration is Key: The Three Amigos
BDD thrives on the collaboration between three key perspectives, often called the "Three Amigos," who work together to define and refine requirements.
Business
(The "Why")
Developer
(The "How")
Tester
(The "What If")