31
Why You Want to Prac.ce Behavior Driven Development Even Though You Might Not Know it Yet! George Dinwiddie — @gdinwiddie

Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

WhyYouWanttoPrac.ceBehaviorDrivenDevelopment

EvenThoughYouMightNotKnowitYet!

GeorgeDinwiddie—@gdinwiddie

Page 2: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

GeorgeDinwiddie—@gdinwiddie

What?

Page 3: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

BDDis…

•  Aprac.cethathasmanyfacets•  Aprac.cethatiswidelymisunderstoodormisconceivedwithhalf-truths.

hDps://en.wikipedia.org/wiki/File:Blind_men_and_elephant3.jpg

GeorgeDinwiddie—@gdinwiddie

Page 4: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

BDDis…•  Aconversa)onabouthowyouwantthesystemtoact,illustratedwithexamples

•  Amee)ngofthemindsamongthestakeholdersandimplementers

ThesestakeholdersandimplementersareoPencalledtheThreeAmigosbecausetheyinclude•  Abusinessrepresenta.ve•  Aprogrammer•  Atester

GeorgeDinwiddie—@gdinwiddie

Page 5: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

BDDOutcomes

• CommonUnderstanding• Automa.cVerifica.on• DurableDocumenta.on

CommonUnderstanding

Automa)cVerifica)on

DurableDocumenta)on

BDD

GeorgeDinwiddie—@gdinwiddie

Page 6: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Feature:~~~~~~~~~~~~~~~~~~~~~~~~~Scenario:~~~~~~Given~~~~~~When~~~~~~Then~~~~~~~

Itstartswithanidea

DeliberateDiscovery

BytheThreeAmigos

UsingExampleMapping

Ask:“Isthiswhatyoumeant?”

Detailscenariosfortheexamples

GeorgeDinwiddie—@gdinwiddie

Page 7: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

ExecutableDescrip.on

Documenttheintent

Guardagainstregressions

Modifybehaviorinten)onally

Page 8: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Remember,asLizKeoghsays…

Havingconversa.ons

ismoreimportantthancapturingconversa.ons

ismoreimportantthan

automa.ngconversa.ons

GeorgeDinwiddie—@gdinwiddie

Page 9: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

GeorgeDinwiddie—@gdinwiddie

Why?

Page 10: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

You’reprogrammingandyoudiscoverthat

youdon’tknowhowthesystemshouldbehave

forsomesitua.on

GeorgeDinwiddie—@gdinwiddie

Page 11: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Planningmee.ngrunlongaspeoplediscuss

what’sinandwhat’snotinastorybeingconsidered

GeorgeDinwiddie—@gdinwiddie

Page 12: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

You’reprogrammingandsomethingintherequirements

doesn’tmakesense

GeorgeDinwiddie—@gdinwiddie

Page 13: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

You’reprogrammingandyoucaninterpret

somethingintherequirementstwoways,

butyoucan’tdoboth

GeorgeDinwiddie—@gdinwiddie

Page 14: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Youcodeafeatureandthetestersays

“That’snothowthisshouldwork!”

GeorgeDinwiddie—@gdinwiddie

Page 15: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Theprogrammerandtestergotalktothebusinessanalyst

tofindoutwhichoneisrightAndthey’reBOTHwrong.

GeorgeDinwiddie—@gdinwiddie

Page 16: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Youbuildsomefunc.onalityandthenfindoutthe

requirementswerewrong

GeorgeDinwiddie—@gdinwiddie

Page 17: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Yourrequirementsdocumentasksforfunc.onality

that’simpossibletocreate

GeorgeDinwiddie—@gdinwiddie

Page 18: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Someofthefunc.onalitythebusinesswanted

wasn’tspecifiedintherequirementsdocument

GeorgeDinwiddie—@gdinwiddie

Page 19: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

You’retes.ngsomenewfunc.onality

withusersanddiscover

it’snotdoingwhatyouintendedtotest

GeorgeDinwiddie—@gdinwiddie

Page 20: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Finishedcodewashandedtotestersand

camebackforbugfixes

GeorgeDinwiddie—@gdinwiddie

Page 21: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Func.onalityyouwroteandcheckedthatitworked

isnowbroken

GeorgeDinwiddie—@gdinwiddie

Page 22: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Func.onalitythatwasdeliveredinapreviousreleasenowdoesn’twork

GeorgeDinwiddie—@gdinwiddie

Page 23: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Youupgradedalibraryorframeworkand

don’tknowwhateffectsthathasonyourapplica.on’sfunc.ons

GeorgeDinwiddie—@gdinwiddie

Page 24: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Tes.ngtakestoolongwhenyouneedtoshiparelease

GeorgeDinwiddie—@gdinwiddie

Page 25: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Youcan’ttellhowfaralongyouare

indevelopingthefunc.onalitythebusinesswants

GeorgeDinwiddie—@gdinwiddie

Page 26: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

You’vefixedthesamebugmorethanonce

GeorgeDinwiddie—@gdinwiddie

Page 27: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

You’veforgoDenhowafunc.onwriDenlastyear

works

GeorgeDinwiddie—@gdinwiddie

Page 28: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Thebusinessaskedyouwhatarethebusinessrules

foraspecificsitua.on

GeorgeDinwiddie—@gdinwiddie

Page 29: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

Youthinkit’sgoingtobehard

togetstarteddoingBDD

GeorgeDinwiddie—@gdinwiddie

Page 30: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

BasicBDDResources

•  IntroducingBDD,byDanNorthhDp://dannorth.net/introducing-bdd/•  Adescrip9onfrom2006ofthebeginningsand

essen9alsofBDD•  ATDDvs.BDD,andapoDedhistoryofsome

relatedstuff,byLizKeoghhDp://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-poDed-history-of-some-related-stuff/•  BDDdescribedinthecontextofsomerelated

ideas

GeorgeDinwiddie—@gdinwiddie

Page 31: Why You Want to Practice BDD - iDIA Computingidiacomputing.com/pub/Why You Want to Practice BDD.pdf · 2019. 7. 24. · Why You Want to Prac.ce Behavior Driven Development Even Though

GeorgeDinwiddie—@gdinwiddie

AvailableonLeanPubCodeonGitHub