SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
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/

Contenu connexe

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Delhi Call girls
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...Aggregage
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear RegressionRavindra Nath Shukla
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...rajveerescorts2022
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Lviv Startup Club
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsMichael W. Hawkins
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 

Dernier (20)

Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael Hawkins
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 

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/