SAFe Knowledge Base » Behavior-Driven Development
Behavior-Driven Development
It's just what I asked for, but not what I want.
—The Night Before Implementation poem, Author Unknown
Behavior-Driven Development (BDD) is a test-first, Agile Testing practice that provides Built-In Quality by defining (and potentially automating) tests before or as part of specifying system behavior. BDD is a collaborative process that creates a shared understanding of requirements between the business and the Agile Teams. Its goal is to help guide development, decrease rework, and increase flow. Without focusing on internal implementation, BDD tests are business-facing scenarios that attempt to describe the behavior of a Story, Feature, or Capability from a user's perspective.
When automated, these tests ensure that the system continuously meets the specified behavior even as the system evolves. That, in turn, enables Release on Demand. Automated BDD tests can also serve as the definitive statement regarding the as-built system behavior, replacing other types of behavioral specifications.
Details
Align on System Behavior
Aligning on precisely what to build is a challenge when developing innovative systems. In addition, new ideas are difficult to communicate with the diverse stakeholders responsible for system implementation. Figure 1 illustrates the three perspectives (called the triad [1]) required to define solution behavior clearly:
- Customer-centric stakeholders understand customer and business needs and the relative desirability and viability of a new requirement
- Development-centric stakeholders understand the solution space and technological feasibility
- Test-centric stakeholders consider the exceptions, edge cases, and boundary conditions for the new behavior
Together, this group reaches alignment on precisely what to build to reduce the rework associated with making the wrong thing and accelerate the flow of value.