SlideShare a Scribd company logo
Behaviour	
  Driven	
  Development	
  
 Beyond	
  “Given,	
  When,	
  Then”	
  


            Antony	
  Marcano	
  
The	
  Telephone	
  Game	
  




             h<p://www.brokenpicturetelephone.com/	
  
What	
  is	
  BDD?	
  

Beyond	
  “Given,	
  When,	
  Then”	
  
BDD	
  Origins	
  
	
  ‘ The	
  deeper	
  I	
  got	
  into	
  TDD,	
  the	
  more	
  I	
  felt	
  that	
  my	
  own	
  
    journey	
  had	
  been	
  less	
  of	
  a	
  wax-­‐on,	
  wax-­‐off	
  process	
  of	
  
    gradual	
  mastery	
  than	
  a	
  series	
  of	
  blind	
  alleys.	
  I	
  remember	
  
    thinking	
  “If	
  only	
  someone	
  had	
  told	
  me	
  that!”…	
  	
  
	
  I	
  decided	
  it	
  must	
  be	
  possible	
  to	
  present	
  TDD	
  in	
  a	
  way	
  that	
  
    gets	
  straight	
  to	
  the	
  good	
  stuff	
  and	
  avoids	
  all	
  the	
  piFalls.	
  	
  
    My	
  response	
  is	
  behaviour-­‐driven	
  development	
  (BDD).	
  	
  
	
  Over	
  Lme,	
  BDD	
  has	
  grown	
  to	
  encompass	
  the	
  wider	
  picture	
  
    of	
  agile	
  analysis	
  and	
  automated	
  acceptance	
  tesLng.’	
  
	
  -­‐Dan	
  North	
  
BDD	
  Origins	
  -­‐	
  Shortened	
  
“ 	
  Behaviour	
  Driven	
  Development	
  (BDD)	
  builds	
  
      upon	
  Test-­‐Driven	
  Development	
  (TDD)	
  by	
  
      formalising	
  the	
  good	
  habits	
  of	
  the	
  best	
  TDD	
  
      pracMMoners.	
  ”	
  –	
  The	
  Cucumber	
  Book,	
  Aslak	
  Hellesøy,	
  Ma<	
  Wynne	
  
Some	
  ‘Good	
  Habits’	
  

     Slice	
  VerMcally	
  
Work	
  from	
  the	
  outside-­‐in	
  
 One	
  example	
  at	
  a	
  Mme	
  
Slice	
  VerMcally	
  
SoWware	
  Components	
  
                                                                                                 SoWware	
  Components	
  
                                                                                                  (modules/classes)	
  
                                                                                                   (modules/classes)	
  




                                                           Lme	
  
                                                           Lme	
  



2009
                                                                          Sprint	
  nn
                                                                        IteraMon	
  	
   	
  
                                                                       Sprint	
  n+1…	
  
                                                                     IteraMon	
  n+1…	
  




                                                                                                                                     Story	
  
                                                                                                                             User	
  Login	
   A	
  


                                                                                                                             User	
  Story	
  B	
  
                                                                                                                             Create	
  album	
  
                                                                                                                                                       TradiMonally,	
  development	
  is	
  sliced	
  horizontally	
  




                                                                                                                             User	
  Story	
  C	
  
                                                                                                                              Share	
  photos	
  
                                                                          Sprint	
  x
                                                                        IteraMon	
  	
  x	
  




                                                                                                                             User	
  Story	
  D	
  
                                                                                                                             Private	
  albums	
  
       …but defers feedback (often, until it’s too late)
8
SoWware	
  Components	
  
                                                                        (modules/classes)	
  




                                      Lme	
  



2009
                                                                                                  Share	
  photos	
  




                                                IteraMon	
  n	
  
                                                                                                  Create	
  album	
  


                                                                                                  Share	
  photos	
  

                                                IteraMon	
  n+1	
  
                                                                                                                          VerMcal	
  slicing	
  




                                                                                                         Login	
  


                                                                                                   Create	
  album	
  


                                                                                                   Share	
  photos	
  
                                                IteraMon	
  x	
  




                                                                                                  Private	
  albums	
  
       …results in earlier feedback
9
Work	
  from	
  the	
  outside-­‐in	
  
Outside-­‐in	
  
One	
  example	
  at	
  a	
  Mme	
  
One	
  example	
  at	
  a	
  Mme	
  
Expressing	
  Examples	
  

    Given,	
  When,	
  Then	
  
       And	
  beyond	
  
Given	
  When	
  Then	
  
	
  Given	
  <some	
  iniMal	
  context>	
  
	
  When	
  <something	
  happens>	
  
	
  Then	
  <some	
  expectaMon>	
  
Given	
  When	
  Then	
  
	
  Given	
  <some	
  iniMal	
  context>	
  
	
  	
  [and	
  some	
  addiMonal	
  context]	
  
	
  When	
  <something	
  happens>	
  
	
  	
  [and	
  something	
  else	
  happens]	
  
	
  Then	
  <some	
  expectaMon>	
  
	
  	
  [and	
  some	
  more	
  expectaMons]	
  
A	
  Typical	
  IllustraMon	
  
Scenario: Login Successfully!
  Given I am on the home-page!
  When I enter the username ‘antony’!
  And I enter the password ‘p4$$w0rd’!
  And I click ‘login’!
  Then I should be logged in	
  	
  




 What’s	
  wrong	
  with	
  this	
  example?	
  
A	
  Be<er	
  IllustraMon	
  
Scenario: Login Successfully!
 When I login as ‘antony’ with the password ‘p4$$w0rd’!
 Then I should be logged in	
  	
  




               Why	
  is	
  it	
  be<er?	
  
Task	
  Analysis	
  

A	
  li<le	
  UX	
  for	
  our	
  BDD	
  
•  Pitching	
  it	
  right…	
  
    –  Goals 	
                          	
  e.g.	
  Withdraw	
  Cash	
  
        •  Tasks	
  	
  	
   	
  IdenMfy	
  to	
  bank	
  
           	
   	
              	
  	
  	
  	
  	
   	
  Request	
  amount	
  
                                                                                                   }	
        Just	
  right	
  



                       –  (inter)acLons	
  



                                                                                                   }	
  
                         	
     	
        	
         	
  Insert	
  Card	
  
                                                                                                              Too	
  
                         	
     	
        	
  	
     	
  Enter	
  Pin	
  
                                                                                                              low	
  
                         	
     	
        	
         	
  Press	
  “Withdraw	
  Cash” 	
     	
         	
     level	
   	
  	
  
                                                                                                                	
  
                         	
     	
        	
         	
  Enter	
  amount	
  
                         	
     	
        	
         	
  Press	
  OK	
  
For	
  example…	
  

When I attempt to add, the number ‘2’ and the number ’3’!




                             task	
  

                     }	
  
                         acMons	
  

                                        h<p://cukesalad.info	
  
Some	
  nice	
  side-­‐effects	
  
          Encourages	
  descripMon	
  	
  
    of	
  UI	
  interacMons	
  in	
  one	
  place	
  

Makes	
  it	
  easier	
  to	
  execute	
  scenarios	
  
       via	
  different	
  interfaces	
  
Discussion	
  

 QuesMons?	
  
   Ideas?	
  
 Feedback?	
  
antony@riverglide.com 	
   	
  @AntonyMarcano	
  
talktous@riverglide.com	
   	
  @RiverGlide/rs	
  
  	
   	
     	
     	
     	
     	
     	
     	
     	
     	
     	
  h<p://twi<er.com/RiverGlide/rs	
  

h<p://cukesalad.info 	
   	
   	
  #cukesalad	
  
h<p://RiverGlide.com	
   	
   	
  @RiverGlide	
  	
  
Ad

More Related Content

Viewers also liked (11)

Intro to TDD & BDD
Intro to TDD & BDDIntro to TDD & BDD
Intro to TDD & BDD
devObjective
 
Hsv.py Lightning Talk - Bottle
Hsv.py Lightning Talk - BottleHsv.py Lightning Talk - Bottle
Hsv.py Lightning Talk - Bottle
Patrick Viafore
 
Futurecasting
FuturecastingFuturecasting
Futurecasting
Angela Housand
 
Security Automation using ZAP
Security Automation using ZAPSecurity Automation using ZAP
Security Automation using ZAP
Vaibhav Gupta
 
Visita Policía Nacional
Visita Policía NacionalVisita Policía Nacional
Visita Policía Nacional
pimasan
 
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web ApplicationsBDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
Patrick Viafore
 
Modelling by Example Workshop - PHPNW 2016
Modelling by Example Workshop - PHPNW 2016Modelling by Example Workshop - PHPNW 2016
Modelling by Example Workshop - PHPNW 2016
CiaranMcNulty
 
TDD in Agile
TDD in AgileTDD in Agile
TDD in Agile
Atish Narlawar
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
Steve Zhang
 
Getting Comfortable with BDD
Getting Comfortable with BDDGetting Comfortable with BDD
Getting Comfortable with BDD
Alex Sharp
 
BDD style Unit Testing
BDD style Unit TestingBDD style Unit Testing
BDD style Unit Testing
Wen-Tien Chang
 
Intro to TDD & BDD
Intro to TDD & BDDIntro to TDD & BDD
Intro to TDD & BDD
devObjective
 
Hsv.py Lightning Talk - Bottle
Hsv.py Lightning Talk - BottleHsv.py Lightning Talk - Bottle
Hsv.py Lightning Talk - Bottle
Patrick Viafore
 
Security Automation using ZAP
Security Automation using ZAPSecurity Automation using ZAP
Security Automation using ZAP
Vaibhav Gupta
 
Visita Policía Nacional
Visita Policía NacionalVisita Policía Nacional
Visita Policía Nacional
pimasan
 
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web ApplicationsBDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
Patrick Viafore
 
Modelling by Example Workshop - PHPNW 2016
Modelling by Example Workshop - PHPNW 2016Modelling by Example Workshop - PHPNW 2016
Modelling by Example Workshop - PHPNW 2016
CiaranMcNulty
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
Steve Zhang
 
Getting Comfortable with BDD
Getting Comfortable with BDDGetting Comfortable with BDD
Getting Comfortable with BDD
Alex Sharp
 
BDD style Unit Testing
BDD style Unit TestingBDD style Unit Testing
BDD style Unit Testing
Wen-Tien Chang
 

More from AgileOnTheBeach (20)

Research instruments case study
Research instruments case studyResearch instruments case study
Research instruments case study
AgileOnTheBeach
 
Sullivan cuff case study
Sullivan cuff case studySullivan cuff case study
Sullivan cuff case study
AgileOnTheBeach
 
Value stream mapping
Value stream mapping  Value stream mapping
Value stream mapping
AgileOnTheBeach
 
Tool up your lamp stack
Tool up your lamp stackTool up your lamp stack
Tool up your lamp stack
AgileOnTheBeach
 
The problem solvers problem
The problem solvers problemThe problem solvers problem
The problem solvers problem
AgileOnTheBeach
 
System Error
System ErrorSystem Error
System Error
AgileOnTheBeach
 
Surfing the Agile Wave
Surfing the Agile WaveSurfing the Agile Wave
Surfing the Agile Wave
AgileOnTheBeach
 
Smart Metrics
Smart Metrics  Smart Metrics
Smart Metrics
AgileOnTheBeach
 
Slow and dirty with callouts
Slow and dirty with calloutsSlow and dirty with callouts
Slow and dirty with callouts
AgileOnTheBeach
 
Research instruments case study
Research instruments case studyResearch instruments case study
Research instruments case study
AgileOnTheBeach
 
Objective agility
Objective agilityObjective agility
Objective agility
AgileOnTheBeach
 
Lean and lego
Lean and lego Lean and lego
Lean and lego
AgileOnTheBeach
 
Ignition team - creating agile companies
Ignition team - creating agile companiesIgnition team - creating agile companies
Ignition team - creating agile companies
AgileOnTheBeach
 
First build the right thing
First build the right thingFirst build the right thing
First build the right thing
AgileOnTheBeach
 
Embedded storycrafting
Embedded storycraftingEmbedded storycrafting
Embedded storycrafting
AgileOnTheBeach
 
Beware sharp tools
Beware sharp toolsBeware sharp tools
Beware sharp tools
AgileOnTheBeach
 
Lean startup
Lean startupLean startup
Lean startup
AgileOnTheBeach
 
Sustaining Test-Driven Development
Sustaining Test-Driven DevelopmentSustaining Test-Driven Development
Sustaining Test-Driven Development
AgileOnTheBeach
 
Agile in Practice
Agile in PracticeAgile in Practice
Agile in Practice
AgileOnTheBeach
 
Oxford Innovation - case study
Oxford Innovation - case studyOxford Innovation - case study
Oxford Innovation - case study
AgileOnTheBeach
 
Ad

Recently uploaded (20)

Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Ad

Behaviour Driven Development - Beyond given when then

  • 1. Behaviour  Driven  Development   Beyond  “Given,  When,  Then”   Antony  Marcano  
  • 2. The  Telephone  Game   h<p://www.brokenpicturetelephone.com/  
  • 3. What  is  BDD?   Beyond  “Given,  When,  Then”  
  • 4. BDD  Origins    ‘ The  deeper  I  got  into  TDD,  the  more  I  felt  that  my  own   journey  had  been  less  of  a  wax-­‐on,  wax-­‐off  process  of   gradual  mastery  than  a  series  of  blind  alleys.  I  remember   thinking  “If  only  someone  had  told  me  that!”…      I  decided  it  must  be  possible  to  present  TDD  in  a  way  that   gets  straight  to  the  good  stuff  and  avoids  all  the  piFalls.     My  response  is  behaviour-­‐driven  development  (BDD).      Over  Lme,  BDD  has  grown  to  encompass  the  wider  picture   of  agile  analysis  and  automated  acceptance  tesLng.’    -­‐Dan  North  
  • 5. BDD  Origins  -­‐  Shortened   “  Behaviour  Driven  Development  (BDD)  builds   upon  Test-­‐Driven  Development  (TDD)  by   formalising  the  good  habits  of  the  best  TDD   pracMMoners.  ”  –  The  Cucumber  Book,  Aslak  Hellesøy,  Ma<  Wynne  
  • 6. Some  ‘Good  Habits’   Slice  VerMcally   Work  from  the  outside-­‐in   One  example  at  a  Mme  
  • 8. SoWware  Components   SoWware  Components   (modules/classes)   (modules/classes)   Lme   Lme   2009 Sprint  nn IteraMon       Sprint  n+1…   IteraMon  n+1…   Story   User  Login   A   User  Story  B   Create  album   TradiMonally,  development  is  sliced  horizontally   User  Story  C   Share  photos   Sprint  x IteraMon    x   User  Story  D   Private  albums   …but defers feedback (often, until it’s too late) 8
  • 9. SoWware  Components   (modules/classes)   Lme   2009 Share  photos   IteraMon  n   Create  album   Share  photos   IteraMon  n+1   VerMcal  slicing   Login   Create  album   Share  photos   IteraMon  x   Private  albums   …results in earlier feedback 9
  • 10. Work  from  the  outside-­‐in  
  • 12. One  example  at  a  Mme  
  • 13. One  example  at  a  Mme  
  • 14. Expressing  Examples   Given,  When,  Then   And  beyond  
  • 15. Given  When  Then    Given  <some  iniMal  context>    When  <something  happens>    Then  <some  expectaMon>  
  • 16. Given  When  Then    Given  <some  iniMal  context>      [and  some  addiMonal  context]    When  <something  happens>      [and  something  else  happens]    Then  <some  expectaMon>      [and  some  more  expectaMons]  
  • 17. A  Typical  IllustraMon   Scenario: Login Successfully! Given I am on the home-page! When I enter the username ‘antony’! And I enter the password ‘p4$$w0rd’! And I click ‘login’! Then I should be logged in     What’s  wrong  with  this  example?  
  • 18. A  Be<er  IllustraMon   Scenario: Login Successfully! When I login as ‘antony’ with the password ‘p4$$w0rd’! Then I should be logged in     Why  is  it  be<er?  
  • 19. Task  Analysis   A  li<le  UX  for  our  BDD  
  • 20. •  Pitching  it  right…   –  Goals    e.g.  Withdraw  Cash   •  Tasks        IdenMfy  to  bank                  Request  amount   }   Just  right   –  (inter)acLons   }          Insert  Card   Too            Enter  Pin   low          Press  “Withdraw  Cash”       level                Enter  amount          Press  OK  
  • 21. For  example…   When I attempt to add, the number ‘2’ and the number ’3’! task   }   acMons   h<p://cukesalad.info  
  • 22. Some  nice  side-­‐effects   Encourages  descripMon     of  UI  interacMons  in  one  place   Makes  it  easier  to  execute  scenarios   via  different  interfaces  
  • 23. Discussion   QuesMons?   Ideas?   Feedback?  
  • 24. [email protected]    @AntonyMarcano   [email protected]    @RiverGlide/rs                        h<p://twi<er.com/RiverGlide/rs   h<p://cukesalad.info      #cukesalad   h<p://RiverGlide.com      @RiverGlide