SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
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
Aslak Hellesoy Executable User Stories R Spec Bdd
BDD: Business value



                      8
Aslak Hellesoy Executable User Stories R Spec Bdd
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
Aslak Hellesoy Executable User Stories R Spec Bdd
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/

Más contenido relacionado

Destacado

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
 

Destacado (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 a 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 a 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
 

Más 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
 

Más 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
 

Último

To Create Your Own Wig Online To Create Your Own Wig Online
To Create Your Own Wig Online  To Create Your Own Wig OnlineTo Create Your Own Wig Online  To Create Your Own Wig Online
To Create Your Own Wig Online To Create Your Own Wig Onlinelng ths
 
Cracking the ‘Business Process Outsourcing’ Code Main.pptx
Cracking the ‘Business Process Outsourcing’ Code Main.pptxCracking the ‘Business Process Outsourcing’ Code Main.pptx
Cracking the ‘Business Process Outsourcing’ Code Main.pptxWorkforce Group
 
NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023Steve Rader
 
NewBase 25 March 2024 Energy News issue - 1710 by Khaled Al Awadi_compress...
NewBase  25 March  2024  Energy News issue - 1710 by Khaled Al Awadi_compress...NewBase  25 March  2024  Energy News issue - 1710 by Khaled Al Awadi_compress...
NewBase 25 March 2024 Energy News issue - 1710 by Khaled Al Awadi_compress...Khaled Al Awadi
 
Q2 2024 APCO Geopolitical Radar - The Global Operating Environment for Business
Q2 2024 APCO Geopolitical Radar - The Global Operating Environment for BusinessQ2 2024 APCO Geopolitical Radar - The Global Operating Environment for Business
Q2 2024 APCO Geopolitical Radar - The Global Operating Environment for BusinessAPCO
 
MC Heights construction company in Jhang
MC Heights construction company in JhangMC Heights construction company in Jhang
MC Heights construction company in Jhangmcgroupjeya
 
Plano de marketing- inglês em formato ppt
Plano de marketing- inglês  em formato pptPlano de marketing- inglês  em formato ppt
Plano de marketing- inglês em formato pptElizangelaSoaresdaCo
 
Slicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup BerlinSlicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup BerlinAnton Skornyakov
 
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)tazeenaila12
 
Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access
 
7movierulz.uk
7movierulz.uk7movierulz.uk
7movierulz.ukaroemirsr
 
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView
 
Project Brief & Information Architecture Report
Project Brief & Information Architecture ReportProject Brief & Information Architecture Report
Project Brief & Information Architecture Reportamberjiles31
 
Entrepreneurship & organisations: influences and organizations
Entrepreneurship & organisations: influences and organizationsEntrepreneurship & organisations: influences and organizations
Entrepreneurship & organisations: influences and organizationsP&CO
 
Boat Trailers Market PPT: Growth, Outlook, Demand, Keyplayer Analysis and Opp...
Boat Trailers Market PPT: Growth, Outlook, Demand, Keyplayer Analysis and Opp...Boat Trailers Market PPT: Growth, Outlook, Demand, Keyplayer Analysis and Opp...
Boat Trailers Market PPT: Growth, Outlook, Demand, Keyplayer Analysis and Opp...IMARC Group
 
Lecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb toLecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb toumarfarooquejamali32
 
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdfGraham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdfAnhNguyen97152
 
Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access
 
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdfTalent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdfCharles Cotter, PhD
 

Último (20)

To Create Your Own Wig Online To Create Your Own Wig Online
To Create Your Own Wig Online  To Create Your Own Wig OnlineTo Create Your Own Wig Online  To Create Your Own Wig Online
To Create Your Own Wig Online To Create Your Own Wig Online
 
Cracking the ‘Business Process Outsourcing’ Code Main.pptx
Cracking the ‘Business Process Outsourcing’ Code Main.pptxCracking the ‘Business Process Outsourcing’ Code Main.pptx
Cracking the ‘Business Process Outsourcing’ Code Main.pptx
 
NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023
 
NewBase 25 March 2024 Energy News issue - 1710 by Khaled Al Awadi_compress...
NewBase  25 March  2024  Energy News issue - 1710 by Khaled Al Awadi_compress...NewBase  25 March  2024  Energy News issue - 1710 by Khaled Al Awadi_compress...
NewBase 25 March 2024 Energy News issue - 1710 by Khaled Al Awadi_compress...
 
Q2 2024 APCO Geopolitical Radar - The Global Operating Environment for Business
Q2 2024 APCO Geopolitical Radar - The Global Operating Environment for BusinessQ2 2024 APCO Geopolitical Radar - The Global Operating Environment for Business
Q2 2024 APCO Geopolitical Radar - The Global Operating Environment for Business
 
MC Heights construction company in Jhang
MC Heights construction company in JhangMC Heights construction company in Jhang
MC Heights construction company in Jhang
 
Plano de marketing- inglês em formato ppt
Plano de marketing- inglês  em formato pptPlano de marketing- inglês  em formato ppt
Plano de marketing- inglês em formato ppt
 
Slicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup BerlinSlicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup Berlin
 
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
 
Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024
 
7movierulz.uk
7movierulz.uk7movierulz.uk
7movierulz.uk
 
Investment Opportunity for Thailand's Automotive & EV Industries
Investment Opportunity for Thailand's Automotive & EV IndustriesInvestment Opportunity for Thailand's Automotive & EV Industries
Investment Opportunity for Thailand's Automotive & EV Industries
 
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
 
Project Brief & Information Architecture Report
Project Brief & Information Architecture ReportProject Brief & Information Architecture Report
Project Brief & Information Architecture Report
 
Entrepreneurship & organisations: influences and organizations
Entrepreneurship & organisations: influences and organizationsEntrepreneurship & organisations: influences and organizations
Entrepreneurship & organisations: influences and organizations
 
Boat Trailers Market PPT: Growth, Outlook, Demand, Keyplayer Analysis and Opp...
Boat Trailers Market PPT: Growth, Outlook, Demand, Keyplayer Analysis and Opp...Boat Trailers Market PPT: Growth, Outlook, Demand, Keyplayer Analysis and Opp...
Boat Trailers Market PPT: Growth, Outlook, Demand, Keyplayer Analysis and Opp...
 
Lecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb toLecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb to
 
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdfGraham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdf
 
Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024
 
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdfTalent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
 

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
  • 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
  • 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/