Behavior-Driven Development (BDD)
BDD is an evolution of test-driven development (TDD) and acceptance-test driven design, and is intended to make these practices more accessible and intuitive to newcomers and experts alike. It shifts the vocabulary from being test-based to behaviour-based, and positions itself as a design philosophy. JBehave Project Homepage
What It Is
- Software Development Methodology
- Evolved out of Test Driven Development (TDD)
- Development Principles + Tooling
- Origins: JBehave by Dan North
Concepts and Principles
- Describe the behavior of the software to build (user stories)
- State the intent and business value of the software to build (feature description)
- Use business readable, domain-specific language in your spec that is understood by all participants in the development process (ubiqitous language)
- shared understanding and ownership of the software specification
- Work from the outside-in (spec to code)
Tooling
A BDD framework will:
- read the spec
- break up user stories (scenarios) into steps
- transfrom steps into parameters for tests
- execute tests step-by-step