7. 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
Sunday, 10 March 13
11. Behavior Driven Development
Practices
• Establish goals
• Draw out features using feature injection
• Involve stakeholders in the implementation
process through outside-in software
development
Sunday, 10 March 13
12. 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
Sunday, 10 March 13
13. Behavior Driven Development
Practices
• Establish goals
• Draw out features using feature injection
• Involve stakeholders in the implementation
process through outside-in software
development
• Automate examples to provide quick
feedback and regression testing
• Use examples to describe behavior
Sunday, 10 March 13
15. What BDD adds to TDD
• Test what an object does instead
of what it is
Sunday, 10 March 13
16. 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
Sunday, 10 March 13
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
• Define acceptance criteria with the
customer and specify it in the
automated way, serve the living spec
Sunday, 10 March 13
20. Gherkin: feature title and narrative
Feature: Adding movies to the queue
Sunday, 10 March 13
21. Gherkin: feature title and narrative
Feature: Adding movies to the queue
Sunday, 10 March 13
22. Gherkin: feature title and narrative
Feature: Adding movies to the queue
Sunday, 10 March 13
23. Gherkin: feature title and narrative
Feature: Adding movies to the queue
Sunday, 10 March 13
24. 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.
Sunday, 10 March 13
26. 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:
Sunday, 10 March 13
40. 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 Solit Conference Tower
is visible to all people across the Globe
Sunday, 10 March 13