bdd: what's in it for me?
DESCRIPTION
Behaviour Driven Development and some of the benefits it offers for developers, customers and testers. Originally presented at Skills Matter: http://skillsmatter.com/event/agile-testing/bdd-whats-in-it-for-meTRANSCRIPT
Behaviour Driven Development
what’s in it for me?
Brent Snook
Thursday, 15 October 2009
Brent who?
• from Melbourne, Australia
• self confessed Agile weenie
• working with BDD for about a year
• available for dev, coaching, children’s parties
• fuglylogic.com
• brentsnook
Thursday, 15 October 2009
Audience
Thursday, 15 October 2009
Audience
Customer
Thursday, 15 October 2009
Audience
Customer Developer
Thursday, 15 October 2009
Audience
Customer Developer Tester
Thursday, 15 October 2009
BDD ≈ DDD + TDD
Thursday, 15 October 2009
Principles of BDD
• It’s all behaviour
•Deliver stakeholder value
•Enough is enough
Thursday, 15 October 2009
Principles of BDD
• It’s all behaviour
•Deliver stakeholder value
•Enough is enough
Thursday, 15 October 2009
In order to speed billingAs a waiterI want to calculate bill total
story descriptions (JIRA, Wiki, Word)
Thursday, 15 October 2009
cheque.sum.should == 12.0
automated unit and acceptance tests
Thursday, 15 October 2009
1. Add £2.00 to bill2. Add £10.00 to bill3. Verify sum is £12.00
test procedures
Thursday, 15 October 2009
Translation
Thursday, 15 October 2009
Translation
Thursday, 15 October 2009
TranslationDONOT
WANT!!Thursday, 15 October 2009
Mmmmm.....Ubiquitous Given an empty billWhen I add £2.00And I add £10.00Then the total is £12.00
Thursday, 15 October 2009
Speak the Same Language
We can understand each other.We are more likely to gain a deeper insight of the problem.We have a better chance of building the right thing. Cool bananas!
Thursday, 15 October 2009
Principles of BDD
• It’s all behaviour
•Deliver stakeholder value
•Enough is enough
Thursday, 15 October 2009
Principles of BDD
• It’s all behaviour
•Deliver stakeholder value
•Enough is enough
Thursday, 15 October 2009
In order to ...
speed up billing ... why?
so that billing is cheaper ... why?
so that I can manage cost DING!
Thursday, 15 October 2009
Reduce Waste
I waste less time and money building things that aren't really needed and uncovering value helps me to prioritise properly. Fantabulous!
Thursday, 15 October 2009
Principles of BDD
• It’s all behaviour
•Deliver stakeholder value
•Enough is enough
Thursday, 15 October 2009
Principles of BDD
• It’s all behaviour
•Deliver stakeholder value
•Enough is enough
Thursday, 15 October 2009
Are We There Yet?
StepScenario
Thursday, 15 October 2009
Demo
Thursday, 15 October 2009
Are We There Yet?
StepScenario
Thursday, 15 October 2009
A Place to Start, A Place to Stop
Knowing where to start, what to do next and when to stop. Bonza!
And less superfluous stuff!
Thursday, 15 October 2009
(Barely) Sufficient Detail
Scenario: Simple bill totalGiven an empty billWhen I add 2 poundsAnd I add 10 poundsThen the total is 12 pounds
Thursday, 15 October 2009
Just Build It
I can start building something as soon as possible. Grouse!
Something to play with earlier!
Thursday, 15 October 2009
2
4
8
1112 12
Tota
l Que
stio
ns
Time
Questions Asked
Thursday, 15 October 2009
2
4
8
1112 12
Tota
l Que
stio
ns
Time
Questions Asked
Testing window
Thursday, 15 October 2009
2
4
8
1112 12
Tota
l Que
stio
ns
Time
Questions Asked
Testing window
Thursday, 15 October 2009
Spread the Load
DevReady Test Done
2 DAYS LEFT !!!
Thursday, 15 October 2009
Explore Early
Less chance of getting swamped and I get to uncover more problems. O' Frabjous day!
Bugs and new scenarios earlier!
Thursday, 15 October 2009
Useful Byproducts
Thursday, 15 October 2009
Safety Net
Thursday, 15 October 2009
Automated Tests
I can make changes with greater confidence and speed. W00t!
Hmm...could I use those?
Thursday, 15 October 2009
Manual Regression Testing
Thursday, 15 October 2009
Shared Ownership
Feature
Step Definitions
Thursday, 15 October 2009
Automated Regression Suite
I can focus more on exploratory testing. Zipidee do da!
Regression testing is cheaper and faster.
Thursday, 15 October 2009
Dead Specifications
Here Lies
Total Bill
Slipped awayOut of sightOut of mind
Won’t be rememberedThursday, 15 October 2009
Live SpecificationsFeature: Total a bill In order to speed billing As a waiter I want to calculate bill total
Scenario: Simple bill with two items Given an empty bill When I add 2 pounds And I add 10 pounds Then the bill total will be 12 pounds
Scenario: Remove item from bill Given an bill totalling 20 pounds When I remove 4 pounds Then the bill total will be 16 pounds
Thursday, 15 October 2009
Documentation on Demand
A comprehensive description of how my system should and does behave? On demand?!Splendiferous!
Handy for verifying behaviour too.
Thursday, 15 October 2009
What’s in it for me?• better understanding of
the problem
• a better chance of getting what I really need
• more efficient development
• quicker feedback
• live behavioural documentation
Thursday, 15 October 2009
What’s in it for me?• better understanding of
the problem
• knowing where to start, what to do next and when to finish
• the chance to start building something earlier
• safety net when I’m making changes
Thursday, 15 October 2009
What’s in it for me?
• better understanding of the problem
• more time to explore
• something to explore earlier
Thursday, 15 October 2009
Whoah There!
Thursday, 15 October 2009
Questions?
• brentsnook
• pub
Thursday, 15 October 2009
Links• http://skillsmatter.com/podcast/agile-testing/bdd-
whats-in-it-for-me
• http://behaviour-driven.org/
• http://dannorth.net/whats-in-a-story
• http://blog.objectmentor.com/articles/2008/11/27/the-truth-about-bdd
• http://en.wikipedia.org/wiki/5_Whys
• http://pragprog.com/titles/achbd/the-rspec-book
• http://www.infoq.com/minibooks/domain-driven-design-quickly
• http://cukes.info
• http://alistair.cockburn.us/Balancing+lightness+with+sufficiency
Thursday, 15 October 2009
Images/Fonts
• Blender - http://www.flickr.com/photos/lintmachine/2987986325
• Steering Wheel - http://www.flickr.com/photos/wheatfields/290438580
• Drinky Bird - http://www.flickr.com/photos/sfmike22/2326128380/
• Post It Note - http://www.flickr.com/photos/flatcat/3555774083/
• Digging for Treasure - http://www.flickr.com/photos/wessexarchaeology/51568417/
• Table Setting and Napkin - http://www.flickr.com/photos/sifu_renka/2789833722/
• Gravestone - http://www.flickr.com/photos/36041246@N00/3419197777/
• Bran - http://www.flickr.com/photos/trekkyandy/3316748814
• Tightrope - http://www.flickr.com/photos/marquette/1812518264/
• Repeat Icon - http://www.iconarchive.com/show/aesthetica-2-icons-by-dryicons/repeat-icon.html
• Silver Bullet - http://www.flickr.com/photos/annguyenphotography/3268547290
• “No” Sign - http://commons.wikimedia.org/wiki/File:No_sign.svg
• Avatar Editor - http://myavatareditor.com/
• Whiteboard Font - http://callsignkatejones.deviantart.com/art/House-Whiteboard-font-64929545
• Napkin Font - http://www.1001fonts.com/font_details.html?font_id=2178
Thursday, 15 October 2009