8. Behavior Driven Development
BDD is an evolution in the thinking
behind TDD & ATDP
Focus on delivery of the
prioritized and verifiable business value
by providing a common vocabulary
Friday, 30 November 12
11. Behavior Driven Development
Practices
• Establish goals
• Draw out features using feature injection
Friday, 30 November 12
12. Behavior Driven Development
Practices
• Establish goals
• Draw out features using feature injection
• Involve stakeholders in the implementation
process through outside-in software
development
Friday, 30 November 12
13. Behavior Driven Development
Practices
• Establish goals
• Draw out features using feature injection
• Involve stakeholders in the implementation
process through outside-in software
development
• Use examples to describe behavior
Friday, 30 November 12
14. Behavior Driven Development
Practices
• Establish goals
• Draw out features using feature injection
• Involve stakeholders in the implementation
process through outside-in software
development
• Use examples to describe behavior
• Automate examples to provide quick
feedback and regression testing
Friday, 30 November 12
16. What BDD adds to TDD
• Test what an object does instead
of what it is
Friday, 30 November 12
17. What BDD adds to TDD
• Test what an object does instead
of what it is
• Design top-down, which is essential
for YAGNI – You Aren't Gonna Need It
Friday, 30 November 12
18. What BDD adds to TDD
• Test what an object does instead
of what it is
• Design top-down, which is essential
for YAGNI – You Aren't Gonna Need It
• Define acceptance criteria with the
customer and specify it in the
automated way, serve the living spec
Friday, 30 November 12
26. Describing Features with Cucumber
Cucumber is a BDD tool that reads plain
text descriptions of application features with
example scenarios, which can be converted
into automation. The text is written in a
business readable domain language,
known as Gherkin.
Friday, 30 November 12
27. Describing Features with Cucumber
Cucumber is a BDD tool that reads plain
text descriptions of application features with
example scenarios, which can be converted
into automation. The text is written in a
business readable domain language,
known as Gherkin.
Friday, 30 November 12
29. Describing code with RSpec
RSpec is a BDD framework, which is
used to write executable examples of
the expected behaviour of a small bit
of code in a controlled context.
Friday, 30 November 12
30. Describing code with RSpec
RSpec is a BDD framework, which is
used to write executable examples of
the expected behaviour of a small bit
of code in a controlled context.
Code example: Output:
Friday, 30 November 12
38. Communications in the business org
1. Translate business goals into prioritized list of features
Friday, 30 November 12
39. Communications in the business org
1. Translate business goals into prioritized list of features
2. Trace required behavior within the team - drive design by
behavior, build transparency, trust and confidence.
Friday, 30 November 12
40. Communications in the business org
1. Translate business goals into prioritized list of features
2. Trace required behavior within the team - drive design by
behavior, build transparency, trust and confidence.
3. Clarify business value and desired software behavior -
ask “5 Why”, provide feedback, if application logic appears
overcomplicated.
Friday, 30 November 12
41. Speaking the same language =
building together
As an awesome team
We want to build such a great product
So that everyone loves it
Given the investment of 22M of bricks
When you place all the bricks properly
Then the Microsoft Tower of Babel
is visible to all people across the Globe
Friday, 30 November 12