SlideShare a Scribd company logo
1 of 27
Download to read offline
Behaviour-Driven
 Development
    Writing software that matters
Aslak Hellesøy - Chief Scientist - BEKK
Stakeholders


               Programmers

      Dual audience

                        2
Origin and inspiration
 JBehave         Test Driven       FIT
Dan North       Development       Ward
Chris Matts       Kent Beck     Cunningham
               Example Driven Chelimsky,
User Stories
                Development Hellesøy, Takita,
Mike Cohn
                Brian Marick  Astels, Baker
Connextra      Domain Driven    Acceptance-
 Stories          Design        Test Driven
 Several         Eric Evans       Planning
Software development is
   all about delivering
      business value


                     4
What’s being
  used




               Source: CHAOS report
Where
 errors are
introduced




              Source: CHAOS report
BDD: Business value



                      8
Ubiqutous Language



                     10
BDD User Stories
Withdraw Cash
                  Role
As an Account Holder        Operation
I want to withdraw cash in an ATM
So that I can get cash when the bank
       is closed                 1
                   Business value
Origin: Connextra
Challenge:
Common understanding
    of “Done”


                  13
BDD Scenarios

Given I have £200 in my account
When I ask to withdraw £20
Then I should be given £20
And my balance should be £180     1
                    Business value
ATDP
Acceptance-Test Driven Planning


               Product Backlog

   Write                          Iteration
 Scenarios                        Planning


Iteration N (end)           Iteration N+1 (start)
TDD
               Red
  1                         2
Write a                 Make the
failing                 test pass
 test
               Green


 ?
                             3
  Write a              Refactor
passing test
Developers don’t know...
• Where to start
• What to test
• What not to test
• How much to test in one go
• What to call tests
• How to fix a broken test
• That TDD is about design
Outside-In

1
    2
        3
            4
                5
Downloads                         Contributors
 40,000                                100

 30,000                                 75

 20,000                                 50

 10,000                                 25

      0                                  0
           June 2007   February 2008         June 2007   February 2008


                SVN commits                      RubyForge rank
3,313.00                                40

2,484.75                                30

1,656.50                                20

 828.25                                 10

      0                                  0
           June 2007   February 2008         June 2007   February 2008
JRuby << RSpec
RSpec consists of
       2 parts

Story Framework

    Example Framework
RSpec User Stories
Story: Log in

  As a Project contributor
  I want to log in
  So that I can see what projects I have access to

  Scenario: User provides wrong credentials
    Given I am on the login page
    When I log in with login nobody and password useless
    Then I should be informed that my password is incorrect
    And I should not see aslak.hellesoy on the page

  Scenario: User provides correct credentials
    Given I am on the login page
    When I log in with login aslak.hellesoy and password temporary
    Then I should see aslak.hellesoy on the page
    And I should have the opportunity to log out
RSpec Examples
require 'bowling'

describe Bowling do
  before(:each) do
    @bowling = Bowling.new
  end

  it quot;should score 0 for gutter gamequot; do
    20.times { @bowling.hit(0) }
    @bowling.score.should == 0
  end
end
Outside-In
Story: Withdraw Money

  As an account holder
  I want to withdraw money
                                           1
  So that I can get cash when the bank is closed

  Scenario: Overdraft account
    Given an account with -1000 kr
    When I ask for 200 kr
    Given the balance should be -1000 kr



                          2                    describe Bank do
                                                 it quot;should not be creatable with negative balancequot; do
                                                   lambda do

                              3                      Bank.new(-9)
                                                   end.should(raise_error(quot;Negative balancequot;))
                                                 end
                                   4           end



                                           5
Summary
• As a <Role>, I want <Operation> So that
  <Business value>
• Given <Known state>, When I <Action>,
  Then <Expected outcome>
• Work Outside-in in the layer onion
• Write scenarios and tests bottom up (start
  with outcome)
• Tests are sentences
References
• http://behaviour-driven.org/
• http://dannorth.net/introducing-bdd/
• http://dannorth.net/whats-in-a-story/
• http://rspec.info/
• http://jtestr.codehaus.org/
• http://jruby.codehaus.org/
• http://blog.aslakhellesoy.com/

More Related Content

Viewers also liked

Het Spel Van De Wereld
Het Spel Van De WereldHet Spel Van De Wereld
Het Spel Van De WereldyentelB
 
Terapia Masculina
Terapia MasculinaTerapia Masculina
Terapia MasculinaAlexandru S
 
Utah 08 Welcome 091808 Ocwc
Utah 08 Welcome 091808 OcwcUtah 08 Welcome 091808 Ocwc
Utah 08 Welcome 091808 OcwcTerri Bays
 
Brian Holmes - eTwinning
Brian Holmes - eTwinningBrian Holmes - eTwinning
Brian Holmes - eTwinningAlexa Joyce
 
Virginia Commonwealth University School of Mass Communications Commencement A...
Virginia Commonwealth University School of Mass Communications Commencement A...Virginia Commonwealth University School of Mass Communications Commencement A...
Virginia Commonwealth University School of Mass Communications Commencement A...Craig Daitch
 
Música de cine.
Música de cine.Música de cine.
Música de cine.amfelisa
 
P O W E R P O I N T C I M DÀ L I G U E S
P O W E R  P O I N T  C I M  DÀ L I G U E SP O W E R  P O I N T  C I M  DÀ L I G U E S
P O W E R P O I N T C I M DÀ L I G U E Sguest1bf92f
 
Hospitaljapones
HospitaljaponesHospitaljapones
Hospitaljaponesjoanvinpa
 
Nonprofit Website Basics: A Ten-Point Checklist
Nonprofit Website Basics: A Ten-Point ChecklistNonprofit Website Basics: A Ten-Point Checklist
Nonprofit Website Basics: A Ten-Point ChecklistKivi Leroux Miller
 
Jim Webber A Couple Of Ways To Skin An Internet Scale Catx
Jim Webber A Couple Of Ways To Skin An Internet Scale CatxJim Webber A Couple Of Ways To Skin An Internet Scale Catx
Jim Webber A Couple Of Ways To Skin An Internet Scale Catxdeimos
 
Great marketing can save the world
Great marketing can save the worldGreat marketing can save the world
Great marketing can save the worldIan Lurie
 
Studying the Deep Structure of Young-Adult News Consumption
Studying the Deep Structure of Young-Adult News ConsumptionStudying the Deep Structure of Young-Adult News Consumption
Studying the Deep Structure of Young-Adult News Consumptionalirafat
 
Asta Simt Eu Pt 1 1
Asta Simt Eu Pt 1  1  Asta Simt Eu Pt 1  1
Asta Simt Eu Pt 1 1 blarisa
 
Horizontal Leadership Managing Change And Complexity
Horizontal Leadership   Managing Change And ComplexityHorizontal Leadership   Managing Change And Complexity
Horizontal Leadership Managing Change And ComplexityGunnar Westling
 

Viewers also liked (20)

Het Spel Van De Wereld
Het Spel Van De WereldHet Spel Van De Wereld
Het Spel Van De Wereld
 
Terapia Masculina
Terapia MasculinaTerapia Masculina
Terapia Masculina
 
Suerte
SuerteSuerte
Suerte
 
25 de mayo 1810
25 de mayo 181025 de mayo 1810
25 de mayo 1810
 
Goalswithocw
GoalswithocwGoalswithocw
Goalswithocw
 
Utah 08 Welcome 091808 Ocwc
Utah 08 Welcome 091808 OcwcUtah 08 Welcome 091808 Ocwc
Utah 08 Welcome 091808 Ocwc
 
connector-de
connector-deconnector-de
connector-de
 
Brian Holmes - eTwinning
Brian Holmes - eTwinningBrian Holmes - eTwinning
Brian Holmes - eTwinning
 
Virginia Commonwealth University School of Mass Communications Commencement A...
Virginia Commonwealth University School of Mass Communications Commencement A...Virginia Commonwealth University School of Mass Communications Commencement A...
Virginia Commonwealth University School of Mass Communications Commencement A...
 
Música de cine.
Música de cine.Música de cine.
Música de cine.
 
P O W E R P O I N T C I M DÀ L I G U E S
P O W E R  P O I N T  C I M  DÀ L I G U E SP O W E R  P O I N T  C I M  DÀ L I G U E S
P O W E R P O I N T C I M DÀ L I G U E S
 
Hospitaljapones
HospitaljaponesHospitaljapones
Hospitaljapones
 
Nonprofit Website Basics: A Ten-Point Checklist
Nonprofit Website Basics: A Ten-Point ChecklistNonprofit Website Basics: A Ten-Point Checklist
Nonprofit Website Basics: A Ten-Point Checklist
 
Jim Webber A Couple Of Ways To Skin An Internet Scale Catx
Jim Webber A Couple Of Ways To Skin An Internet Scale CatxJim Webber A Couple Of Ways To Skin An Internet Scale Catx
Jim Webber A Couple Of Ways To Skin An Internet Scale Catx
 
Great marketing can save the world
Great marketing can save the worldGreat marketing can save the world
Great marketing can save the world
 
Studying the Deep Structure of Young-Adult News Consumption
Studying the Deep Structure of Young-Adult News ConsumptionStudying the Deep Structure of Young-Adult News Consumption
Studying the Deep Structure of Young-Adult News Consumption
 
Asta Simt Eu Pt 1 1
Asta Simt Eu Pt 1  1  Asta Simt Eu Pt 1  1
Asta Simt Eu Pt 1 1
 
Horizontal Leadership Managing Change And Complexity
Horizontal Leadership   Managing Change And ComplexityHorizontal Leadership   Managing Change And Complexity
Horizontal Leadership Managing Change And Complexity
 
Västervik
VästervikVästervik
Västervik
 
Girls & tech
Girls & techGirls & tech
Girls & tech
 

Similar to Aslak Hellesoy Executable User Stories R Spec Bdd

BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumberDaniel Kummer
 
Sustainable Agile Development
Sustainable Agile DevelopmentSustainable Agile Development
Sustainable Agile DevelopmentGabriele Lana
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 
ruby on rails pitfalls
ruby on rails pitfallsruby on rails pitfalls
ruby on rails pitfallsRobbin Fan
 
Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Abhishek Singh
 
Presentation focus orfail june 2010
Presentation focus orfail june 2010Presentation focus orfail june 2010
Presentation focus orfail june 2010Mick Liubinskas
 
Bdd with Cucumber and Mocha
Bdd with Cucumber and MochaBdd with Cucumber and Mocha
Bdd with Cucumber and MochaAtish Narlawar
 
Bridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous DeliveryBridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous Deliverymasoodjan
 
Social Analytics on MongoDB at MongoNYC
Social Analytics on MongoDB at MongoNYCSocial Analytics on MongoDB at MongoNYC
Social Analytics on MongoDB at MongoNYCPatrick Stokes
 
The only thing that matters
The only thing that mattersThe only thing that matters
The only thing that mattersAdir Amsalem
 
BADCamp 2008 DB Sync
BADCamp 2008 DB SyncBADCamp 2008 DB Sync
BADCamp 2008 DB SyncShaun Haber
 
Cqrs, Event Sourcing
Cqrs, Event SourcingCqrs, Event Sourcing
Cqrs, Event SourcingAshic Mahtab
 
10 tips
10 tips10 tips
10 tipsdjras
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Railsdosire
 
Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Mayank Shrivastava
 
Agile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin Salvekar
Agile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin SalvekarAgile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin Salvekar
Agile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin SalvekarIndia Scrum Enthusiasts Community
 
Moving away from legacy code with BDD
Moving away from legacy code with BDDMoving away from legacy code with BDD
Moving away from legacy code with BDDKonstantin Kudryashov
 

Similar to Aslak Hellesoy Executable User Stories R Spec Bdd (20)

BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
Sustainable Agile Development
Sustainable Agile DevelopmentSustainable Agile Development
Sustainable Agile Development
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
ruby on rails pitfalls
ruby on rails pitfallsruby on rails pitfalls
ruby on rails pitfalls
 
Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up
 
Presentation focus orfail june 2010
Presentation focus orfail june 2010Presentation focus orfail june 2010
Presentation focus orfail june 2010
 
Bdd with Cucumber and Mocha
Bdd with Cucumber and MochaBdd with Cucumber and Mocha
Bdd with Cucumber and Mocha
 
Bridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous DeliveryBridging the communication Gap & Continuous Delivery
Bridging the communication Gap & Continuous Delivery
 
Social Analytics on MongoDB at MongoNYC
Social Analytics on MongoDB at MongoNYCSocial Analytics on MongoDB at MongoNYC
Social Analytics on MongoDB at MongoNYC
 
The only thing that matters
The only thing that mattersThe only thing that matters
The only thing that matters
 
BADCamp 2008 DB Sync
BADCamp 2008 DB SyncBADCamp 2008 DB Sync
BADCamp 2008 DB Sync
 
Cqrs, Event Sourcing
Cqrs, Event SourcingCqrs, Event Sourcing
Cqrs, Event Sourcing
 
Introduction to-ddd
Introduction to-dddIntroduction to-ddd
Introduction to-ddd
 
No estimates
No estimatesNo estimates
No estimates
 
10 tips
10 tips10 tips
10 tips
 
Dev Day
Dev DayDev Day
Dev Day
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020
 
Agile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin Salvekar
Agile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin SalvekarAgile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin Salvekar
Agile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin Salvekar
 
Moving away from legacy code with BDD
Moving away from legacy code with BDDMoving away from legacy code with BDD
Moving away from legacy code with BDD
 

More from deimos

Aspect Orientated Programming in Ruby
Aspect Orientated Programming in RubyAspect Orientated Programming in Ruby
Aspect Orientated Programming in Rubydeimos
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuerydeimos
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvmdeimos
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwrdeimos
 
Venkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In GroovyVenkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In Groovydeimos
 
Venkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic LanguagesVenkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic Languagesdeimos
 
Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfacesdeimos
 
Tim Mackinnon Agile And Beyond
Tim Mackinnon Agile And BeyondTim Mackinnon Agile And Beyond
Tim Mackinnon Agile And Beyonddeimos
 
Steve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And SerendipitySteve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And Serendipitydeimos
 
Stefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The WebStefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The Webdeimos
 
Stefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To RestStefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To Restdeimos
 
Rod Johnson Cathedral
Rod Johnson CathedralRod Johnson Cathedral
Rod Johnson Cathedraldeimos
 
Mike Stolz Dramatic Scalability
Mike Stolz Dramatic ScalabilityMike Stolz Dramatic Scalability
Mike Stolz Dramatic Scalabilitydeimos
 
Matt Youill Betfair
Matt Youill BetfairMatt Youill Betfair
Matt Youill Betfairdeimos
 
Pete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two SystemsPete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two Systemsdeimos
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registrydeimos
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platformdeimos
 
Neal Gafter Java Evolution
Neal Gafter Java EvolutionNeal Gafter Java Evolution
Neal Gafter Java Evolutiondeimos
 
Markus Voelter Textual DSLs
Markus Voelter Textual DSLsMarkus Voelter Textual DSLs
Markus Voelter Textual DSLsdeimos
 
Marc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond AgileMarc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond Agiledeimos
 

More from deimos (20)

Aspect Orientated Programming in Ruby
Aspect Orientated Programming in RubyAspect Orientated Programming in Ruby
Aspect Orientated Programming in Ruby
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuery
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvm
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwr
 
Venkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In GroovyVenkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In Groovy
 
Venkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic LanguagesVenkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic Languages
 
Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfaces
 
Tim Mackinnon Agile And Beyond
Tim Mackinnon Agile And BeyondTim Mackinnon Agile And Beyond
Tim Mackinnon Agile And Beyond
 
Steve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And SerendipitySteve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And Serendipity
 
Stefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The WebStefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The Web
 
Stefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To RestStefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To Rest
 
Rod Johnson Cathedral
Rod Johnson CathedralRod Johnson Cathedral
Rod Johnson Cathedral
 
Mike Stolz Dramatic Scalability
Mike Stolz Dramatic ScalabilityMike Stolz Dramatic Scalability
Mike Stolz Dramatic Scalability
 
Matt Youill Betfair
Matt Youill BetfairMatt Youill Betfair
Matt Youill Betfair
 
Pete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two SystemsPete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two Systems
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platform
 
Neal Gafter Java Evolution
Neal Gafter Java EvolutionNeal Gafter Java Evolution
Neal Gafter Java Evolution
 
Markus Voelter Textual DSLs
Markus Voelter Textual DSLsMarkus Voelter Textual DSLs
Markus Voelter Textual DSLs
 
Marc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond AgileMarc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond Agile
 

Recently uploaded

Future Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted VersionFuture Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted VersionMintel Group
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfJos Voskuil
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyotictsugar
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Pereraictsugar
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesKeppelCorporation
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Servicecallgirls2057
 
Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03DallasHaselhorst
 
Organizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessOrganizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessSeta Wicaksana
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCRashishs7044
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfRbc Rbcua
 
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxMarkAnthonyAurellano
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607dollysharma2066
 
Buy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy Verified Accounts
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...ictsugar
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCRashishs7044
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menzaictsugar
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis UsageNeil Kimberley
 

Recently uploaded (20)

Future Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted VersionFuture Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted Version
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdf
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyot
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Perera
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation Slides
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
 
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCREnjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
 
Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03
 
Organizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessOrganizational Structure Running A Successful Business
Organizational Structure Running A Successful Business
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdf
 
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
 
Buy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail Accounts
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage
 

Aslak Hellesoy Executable User Stories R Spec Bdd

  • 1. Behaviour-Driven Development Writing software that matters Aslak Hellesøy - Chief Scientist - BEKK
  • 2. Stakeholders Programmers Dual audience 2
  • 3. Origin and inspiration JBehave Test Driven FIT Dan North Development Ward Chris Matts Kent Beck Cunningham Example Driven Chelimsky, User Stories Development Hellesøy, Takita, Mike Cohn Brian Marick Astels, Baker Connextra Domain Driven Acceptance- Stories Design Test Driven Several Eric Evans Planning
  • 4. Software development is all about delivering business value 4
  • 5. What’s being used Source: CHAOS report
  • 6. Where errors are introduced Source: CHAOS report
  • 7.
  • 9.
  • 11. BDD User Stories Withdraw Cash Role As an Account Holder Operation I want to withdraw cash in an ATM So that I can get cash when the bank is closed 1 Business value
  • 14. BDD Scenarios Given I have £200 in my account When I ask to withdraw £20 Then I should be given £20 And my balance should be £180 1 Business value
  • 15. ATDP Acceptance-Test Driven Planning Product Backlog Write Iteration Scenarios Planning Iteration N (end) Iteration N+1 (start)
  • 16. TDD Red 1 2 Write a Make the failing test pass test Green ? 3 Write a Refactor passing test
  • 17. Developers don’t know... • Where to start • What to test • What not to test • How much to test in one go • What to call tests • How to fix a broken test • That TDD is about design
  • 18. Outside-In 1 2 3 4 5
  • 19.
  • 20. Downloads Contributors 40,000 100 30,000 75 20,000 50 10,000 25 0 0 June 2007 February 2008 June 2007 February 2008 SVN commits RubyForge rank 3,313.00 40 2,484.75 30 1,656.50 20 828.25 10 0 0 June 2007 February 2008 June 2007 February 2008
  • 22. RSpec consists of 2 parts Story Framework Example Framework
  • 23. RSpec User Stories Story: Log in As a Project contributor I want to log in So that I can see what projects I have access to Scenario: User provides wrong credentials Given I am on the login page When I log in with login nobody and password useless Then I should be informed that my password is incorrect And I should not see aslak.hellesoy on the page Scenario: User provides correct credentials Given I am on the login page When I log in with login aslak.hellesoy and password temporary Then I should see aslak.hellesoy on the page And I should have the opportunity to log out
  • 24. RSpec Examples require 'bowling' describe Bowling do before(:each) do @bowling = Bowling.new end it quot;should score 0 for gutter gamequot; do 20.times { @bowling.hit(0) } @bowling.score.should == 0 end end
  • 25. Outside-In Story: Withdraw Money As an account holder I want to withdraw money 1 So that I can get cash when the bank is closed Scenario: Overdraft account Given an account with -1000 kr When I ask for 200 kr Given the balance should be -1000 kr 2 describe Bank do it quot;should not be creatable with negative balancequot; do lambda do 3 Bank.new(-9) end.should(raise_error(quot;Negative balancequot;)) end 4 end 5
  • 26. Summary • As a <Role>, I want <Operation> So that <Business value> • Given <Known state>, When I <Action>, Then <Expected outcome> • Work Outside-in in the layer onion • Write scenarios and tests bottom up (start with outcome) • Tests are sentences
  • 27. References • http://behaviour-driven.org/ • http://dannorth.net/introducing-bdd/ • http://dannorth.net/whats-in-a-story/ • http://rspec.info/ • http://jtestr.codehaus.org/ • http://jruby.codehaus.org/ • http://blog.aslakhellesoy.com/