BDD: What's in it for me?

50
Behaviour Driven Development what’s in it for me? Brent Snook Thursday, 15 October 2009

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-me

Transcript of BDD: What's in it for me?

Page 1: BDD: What's in it for me?

Behaviour Driven Development

what’s in it for me?

Brent Snook

Thursday, 15 October 2009

Page 2: BDD: What's in it for me?

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

Page 3: BDD: What's in it for me?

Audience

Thursday, 15 October 2009

Page 4: BDD: What's in it for me?

Audience

Customer

Thursday, 15 October 2009

Page 5: BDD: What's in it for me?

Audience

Customer Developer

Thursday, 15 October 2009

Page 6: BDD: What's in it for me?

Audience

Customer Developer Tester

Thursday, 15 October 2009

Page 7: BDD: What's in it for me?

BDD ≈ DDD + TDD

Thursday, 15 October 2009

Page 8: BDD: What's in it for me?

Principles of BDD

• It’s all behaviour

•Deliver stakeholder value

•Enough is enough

Thursday, 15 October 2009

Page 9: BDD: What's in it for me?

Principles of BDD

• It’s all behaviour

•Deliver stakeholder value

•Enough is enough

Thursday, 15 October 2009

Page 10: BDD: What's in it for me?

In order to speed billingAs a waiterI want to calculate bill total

story descriptions (JIRA, Wiki, Word)

Thursday, 15 October 2009

Page 11: BDD: What's in it for me?

cheque.sum.should == 12.0

automated unit and acceptance tests

Thursday, 15 October 2009

Page 12: BDD: What's in it for me?

1. Add £2.00 to bill2. Add £10.00 to bill3. Verify sum is £12.00

test procedures

Thursday, 15 October 2009

Page 13: BDD: What's in it for me?

Translation

Thursday, 15 October 2009

Page 14: BDD: What's in it for me?

Translation

Thursday, 15 October 2009

Page 15: BDD: What's in it for me?

TranslationDONOT

WANT!!Thursday, 15 October 2009

Page 16: BDD: What's in it for me?

Mmmmm.....Ubiquitous Given an empty billWhen I add £2.00And I add £10.00Then the total is £12.00

Thursday, 15 October 2009

Page 17: BDD: What's in it for me?

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

Page 18: BDD: What's in it for me?

Principles of BDD

• It’s all behaviour

•Deliver stakeholder value

•Enough is enough

Thursday, 15 October 2009

Page 19: BDD: What's in it for me?

Principles of BDD

• It’s all behaviour

•Deliver stakeholder value

•Enough is enough

Thursday, 15 October 2009

Page 20: BDD: What's in it for me?

In order to ...

speed up billing ... why?

so that billing is cheaper ... why?

so that I can manage cost DING!

Thursday, 15 October 2009

Page 21: BDD: What's in it for me?

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

Page 22: BDD: What's in it for me?

Principles of BDD

• It’s all behaviour

•Deliver stakeholder value

•Enough is enough

Thursday, 15 October 2009

Page 23: BDD: What's in it for me?

Principles of BDD

• It’s all behaviour

•Deliver stakeholder value

•Enough is enough

Thursday, 15 October 2009

Page 24: BDD: What's in it for me?

Are We There Yet?

StepScenario

Thursday, 15 October 2009

Page 25: BDD: What's in it for me?

Demo

Thursday, 15 October 2009

Page 26: BDD: What's in it for me?

Are We There Yet?

StepScenario

Thursday, 15 October 2009

Page 27: BDD: What's in it for me?

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

Page 28: BDD: What's in it for me?

(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

Page 29: BDD: What's in it for me?

Just Build It

I can start building something as soon as possible. Grouse!

Something to play with earlier!

Thursday, 15 October 2009

Page 30: BDD: What's in it for me?

2

4

8

1112 12

Tota

l Que

stio

ns

Time

Questions Asked

Thursday, 15 October 2009

Page 31: BDD: What's in it for me?

2

4

8

1112 12

Tota

l Que

stio

ns

Time

Questions Asked

Testing window

Thursday, 15 October 2009

Page 32: BDD: What's in it for me?

2

4

8

1112 12

Tota

l Que

stio

ns

Time

Questions Asked

Testing window

Thursday, 15 October 2009

Page 33: BDD: What's in it for me?

Spread the Load

DevReady Test Done

2 DAYS LEFT !!!

Thursday, 15 October 2009

Page 34: BDD: What's in it for me?

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

Page 35: BDD: What's in it for me?

Useful Byproducts

Thursday, 15 October 2009

Page 36: BDD: What's in it for me?

Safety Net

Thursday, 15 October 2009

Page 37: BDD: What's in it for me?

Automated Tests

I can make changes with greater confidence and speed. W00t!

Hmm...could I use those?

Thursday, 15 October 2009

Page 38: BDD: What's in it for me?

Manual Regression Testing

Thursday, 15 October 2009

Page 39: BDD: What's in it for me?

Shared Ownership

Feature

Step Definitions

Thursday, 15 October 2009

Page 40: BDD: What's in it for me?

Automated Regression Suite

I can focus more on exploratory testing. Zipidee do da!

Regression testing is cheaper and faster.

Thursday, 15 October 2009

Page 41: BDD: What's in it for me?

Dead Specifications

Here Lies

Total Bill

Slipped awayOut of sightOut of mind

Won’t be rememberedThursday, 15 October 2009

Page 42: BDD: What's in it for me?

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

Page 43: BDD: What's in it for me?

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

Page 44: BDD: What's in it for me?

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

Page 45: BDD: What's in it for me?

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

Page 46: BDD: What's in it for me?

What’s in it for me?

• better understanding of the problem

• more time to explore

• something to explore earlier

Thursday, 15 October 2009

Page 47: BDD: What's in it for me?

Whoah There!

Thursday, 15 October 2009

Page 48: BDD: What's in it for me?

Questions?

[email protected]

• brentsnook

• pub

Thursday, 15 October 2009

Page 49: BDD: What's in it for me?

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

Page 50: BDD: What's in it for me?

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