SlideShare a Scribd company logo
1 of 35
Behaviour-Driven
 Development
Writing software that matters

 Dan North, ThoughtWorks
   Liz Keogh, Lunivore
Part 1: Software that
  doesn’t matter


          2     © Dan North, ThoughtWorks
Failure modes – a field guide
 The project comes in late
   ...or costs too much to finish

 The application does the wrong thing

 It is unstable in production

 It breaks the rules

 The code is impossible to work with
                       3            © Dan North, ThoughtWorks
How we deliver software
Planning


           Analysis



                          Design




                                                                Deploy
                                       Code



                                              Test
                                                                          t

                      Why do we do this?
                                   4                 © Dan North, ThoughtWorks
The exponential change curve
$   Planning


               Analysis



                          Design




                                                                Deploy
                                       Code



                                              Test
                                                                           t


                                   5                 © Dan North, ThoughtWorks
The exponential change curve
           $
               We fear this...



so we do                         t               which
this...                                          reinforces
                                                 this!




                         6           © Dan North, ThoughtWorks
If only we could deliver better...
  Deliver features rather than modules

  Prioritise often, change often

  Only focus on high-value features

  Flatten the cost of change

  Adapt to feedback

                      Learn!
                        7             © Dan North, ThoughtWorks
What we would need
Adaptive planning

Streaming requirements

Evolving design

Code we can change

Frequent code integration

Run all the regression tests often

Frequent deployments

                        8            © Dan North, ThoughtWorks
Part 2: Software that
       matters


          9     © Dan North, ThoughtWorks
A loose definition of BDD

“Behaviour-driven development is
  about implementing an application
  by describing its behaviour from
  the perspective of its stakeholders”

               - Me 


                  10          © Dan North, ThoughtWorks
A more formal definition of BDD
  “BDD is a second-generation,
    outside-in, pull-based, multiple-
    stakeholder, multiple-scale, high-
    automation, agile methodology.

  “It describes a cycle of interactions
     with well-defined outputs, resulting
     in the delivery of working, tested
     software that matters.”

                     11           © Dan North, ThoughtWorks
...second generation...

                  BDD is derivative
        Derives from:
            XP, especially TDD and CI
            Acceptance Test-Driven Planning
            Lean principles
            Domain-Driven Design

        Influenced by:
            Neurolinguistic Programming (NLP)
            Systems Thinking
                            12           © Dan North, ThoughtWorks
...cycle of interactions...

                  BDD in six pictures




                              13   © Dan North, ThoughtWorks
...cycle of interactions...

            The roles in a BDD team
         The stakeholders

         The analysts (or BAs)

         The testers (or QAs)

         The developers

         The project manager (or Boss)
                              14         © Dan North, ThoughtWorks
...outside-in...

          Who is this application for?
                                                          Vision
                                                    (or Purpose)



                    Outcome                                  Outcome                 Outcome




                   Feature set              Feature set                Feature set   Feature set




                   Features...    Features...        Features...           ...




                    Stories...    Stories...                ...




                   Scenarios...       ...



                                                          15                             © Dan North, ThoughtWorks
...clearly-defined outputs...

                   What’s in a story?
                 A story is a unit of delivery

                Story 28 - View patient details

             As an Anaesthetist
             I want to view the Patient’s surgical history
             So that I can choose the most suitable gas




                                   16               © Dan North, ThoughtWorks
...clearly-defined outputs...

                 Focus on the value


                Story 28 - View patient details

             In order to choose the most suitable gas
             an Anaesthetist
             wants to view the Patient’s surgical history




                                   17               © Dan North, ThoughtWorks
...clearly-defined outputs...

                 Focus on the value


                 Story 29 – Log patient details

             In order to choose the most suitable gas
             an Anaesthetist
             wants other Anaesthetists to log the
             Patient’s surgical history for later retrieval




                                    18               © Dan North, ThoughtWorks
...clearly-defined outputs...

                    Agree on “done”
              Define scope using scenarios

            Scenario – existing patient with history


            Given we have a patient on file
            And the patient has had previous surgery
            When I request the Patient’s surgical history
            Then I see all the previous treatments




                                   19                © Dan North, ThoughtWorks
...clearly-defined outputs...

            Automate the scenarios
                 Make each step executable

               Given we have a patient on file
              In Ruby:
              Given “we have a patient on file” do
                  # ...
              end

              In Java:
              @Given(“we have a patient on file”)
              public void createPatientOnFile() {
                  // ...
              }
                                 20             © Dan North, ThoughtWorks
...clearly-defined outputs...

    Code-by-example to implement
                           Also known as TDD

         Start at the edges, with what you know

         Implement outermost objects and operations

         Discover collaborators, working inwards
             and mock them out for now

         Repeat until “Done”

            If the model doesn’t “feel” right, experiment!

                                  21            © Dan North, ThoughtWorks
...clearly-defined outputs...

            Code-by-example example
      Scenario
                           Examples




 Scenario




                                      22   © Dan North, ThoughtWorks
...clearly-defined outputs...

           Good tools can help here
         Cucumber or JBehave for stories

         RSpec, XUnit for code examples

         Mockito, Mocha, Moq for mocking

         Be opinionated rather than dogmatic
                    with the tooling!

                                23   © Dan North, ThoughtWorks
...clearly-defined outputs...

    We keep the development artifacts
         Examples become code tests
             …and documentation


         Scenarios become acceptance tests
             which become regression tests
             ...and documentation


                        Automation is key
                                24           © Dan North, ThoughtWorks
Part 3: Getting the
   words right


         25    © Dan North, ThoughtWorks
26   © Dan North, ThoughtWorks
Domain-driven design 101
Model your domain
  ...and identify the core domain


Create a shared language
  ...and make it ubiquitous


Determine the model’s bounded context
  ...and think about what happens at the edges
                      27            © Dan North, ThoughtWorks
The map is not the territory
There are many kinds of model
  Each is useful in different contexts


There is no “perfect” domain model
  So don’t try to create one!


  Domain modelling takes practice

                    28            © Dan North, ThoughtWorks
A legacy domain modelling example
    Map<int, Map<int, int>>
      portfolioIdsByTraderId;

    if (portfolioIdsByTraderId.get(trader.getId())
        .containsKey(portfolio.getId())) {...}


    becomes:
    if (trader.canView(portfolio)) {...}




                              29               © Dan North, ThoughtWorks
We often manage multiple domains
 You want to retrieve patient records
   in Java, using Hibernate


 so you define
   class HibernatePatientRecordRepository {


        What if your IDE did domain-specific fonts?




                          30                 © Dan North, ThoughtWorks
Writing effective stories
Each story represents (part of) a feature
   and each feature belongs to a stakeholder

Each stakeholder represents a domain
   even the incidental stakeholders

Mixing domains within a scenario leads to brittle tests
   What exactly is the scenario verifying?
   What does it mean when things change?

“What does the stakeholder want from this story?”
                            31               © Dan North, ThoughtWorks
Conclusion


    32       © Dan North, ThoughtWorks
Software that matters
...has tangible stakeholder value
...is delivered on time, incrementally
...is easy to deploy and manage
...is robust in production
...is easy to understand and communicate

      BDD is a step in that direction

                     33          © Dan North, ThoughtWorks
Thank you

        Any questions?
    dan.north@thoughtworks.com
          http://dannorth.net
              @tastapod

           liz@lunivore.com
           http://lizkeogh.com
                @lunivore

Google Group: BehaviorDrivenDevelopment


                   34             © Dan North, ThoughtWorks
Bibliography
Extreme Programming explained (2nd edition)
- Kent Beck

Domain-Driven Design - Eric Evans

The Art of Systems Thinking
  and
The Way of NLP - Joseph O’Connor

                      35            © Dan North, ThoughtWorks

More Related Content

What's hot

BDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVABDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVASrinivas Katakam
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSmartBear
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberBrandon Keepers
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Ajay Danait
 
Selenium with Cucumber
Selenium  with Cucumber Selenium  with Cucumber
Selenium with Cucumber Knoldus Inc.
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumberNibu Baby
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationJohn Ferguson Smart Limited
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsIosif Itkin
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Mindfire Solutions
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 
What Is Cucumber?
What Is Cucumber?What Is Cucumber?
What Is Cucumber?QATestLab
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD123abcda
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberKMS Technology
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testingdversaci
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 

What's hot (20)

BDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVABDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVA
 
Cucumber BDD
Cucumber BDDCucumber BDD
Cucumber BDD
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
 
Selenium with Cucumber
Selenium  with Cucumber Selenium  with Cucumber
Selenium with Cucumber
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumber
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world application
 
Cucumber & gherkin language
Cucumber & gherkin languageCucumber & gherkin language
Cucumber & gherkin language
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and Cons
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
What Is Cucumber?
What Is Cucumber?What Is Cucumber?
What Is Cucumber?
 
Introduction to TDD and BDD
Introduction to TDD and BDDIntroduction to TDD and BDD
Introduction to TDD and BDD
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testing
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 

Viewers also liked

Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)Naresh Jain
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentLiz Keogh
 
Stop Hiring Devops Experts (And Start Growing Them) - PuppetConf 2013
Stop Hiring Devops Experts (And Start Growing Them) - PuppetConf 2013Stop Hiring Devops Experts (And Start Growing Them) - PuppetConf 2013
Stop Hiring Devops Experts (And Start Growing Them) - PuppetConf 2013Puppet
 
Code as a Communication Tool
Code as a Communication ToolCode as a Communication Tool
Code as a Communication ToolVinicius Gomes
 
ThoughtWorks Quarterly Technology Briefing, London, September 2009
ThoughtWorks Quarterly Technology Briefing, London, September 2009ThoughtWorks Quarterly Technology Briefing, London, September 2009
ThoughtWorks Quarterly Technology Briefing, London, September 2009Thoughtworks
 
Ciso executive summit 2012
Ciso executive summit 2012Ciso executive summit 2012
Ciso executive summit 2012Bill Burns
 
Presenting the BetaCodex (BetaCodex06)
Presenting the BetaCodex (BetaCodex06)Presenting the BetaCodex (BetaCodex06)
Presenting the BetaCodex (BetaCodex06)Niels Pflaeging
 
Agile Recruiting White Paper
Agile Recruiting White PaperAgile Recruiting White Paper
Agile Recruiting White PaperAmber Grewal
 
Lean Times Require Lean Thinking
Lean Times Require Lean ThinkingLean Times Require Lean Thinking
Lean Times Require Lean ThinkingThoughtworks
 
Tech Lead Skills for Developers
Tech Lead Skills for DevelopersTech Lead Skills for Developers
Tech Lead Skills for DevelopersThoughtworks
 
Bdd (Behavior Driven Development)
Bdd (Behavior Driven Development)Bdd (Behavior Driven Development)
Bdd (Behavior Driven Development)Helder De Oliveira
 
managing change in the digital environment
managing change in the digital environmentmanaging change in the digital environment
managing change in the digital environmentJenny Williams
 
Effects of social networking
Effects of social networkingEffects of social networking
Effects of social networkingSandipan Samaddar
 
Rolf Russel - system thinking
Rolf Russel - system thinkingRolf Russel - system thinking
Rolf Russel - system thinkingdevopsdayUSA2010
 
Ill effects of mobile
Ill effects of mobileIll effects of mobile
Ill effects of mobilesurbhi_vijh
 
Introduction to User Experience - Mike Biggs
Introduction to User Experience - Mike BiggsIntroduction to User Experience - Mike Biggs
Introduction to User Experience - Mike BiggsThoughtworks
 

Viewers also liked (20)

Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Stop Hiring Devops Experts (And Start Growing Them) - PuppetConf 2013
Stop Hiring Devops Experts (And Start Growing Them) - PuppetConf 2013Stop Hiring Devops Experts (And Start Growing Them) - PuppetConf 2013
Stop Hiring Devops Experts (And Start Growing Them) - PuppetConf 2013
 
Code as a Communication Tool
Code as a Communication ToolCode as a Communication Tool
Code as a Communication Tool
 
ThoughtWorks Quarterly Technology Briefing, London, September 2009
ThoughtWorks Quarterly Technology Briefing, London, September 2009ThoughtWorks Quarterly Technology Briefing, London, September 2009
ThoughtWorks Quarterly Technology Briefing, London, September 2009
 
Ciso executive summit 2012
Ciso executive summit 2012Ciso executive summit 2012
Ciso executive summit 2012
 
Presenting the BetaCodex (BetaCodex06)
Presenting the BetaCodex (BetaCodex06)Presenting the BetaCodex (BetaCodex06)
Presenting the BetaCodex (BetaCodex06)
 
Agile Recruiting White Paper
Agile Recruiting White PaperAgile Recruiting White Paper
Agile Recruiting White Paper
 
TDD, BDD and mocks
TDD, BDD and mocksTDD, BDD and mocks
TDD, BDD and mocks
 
Lean Times Require Lean Thinking
Lean Times Require Lean ThinkingLean Times Require Lean Thinking
Lean Times Require Lean Thinking
 
Tech Lead Skills for Developers
Tech Lead Skills for DevelopersTech Lead Skills for Developers
Tech Lead Skills for Developers
 
Bdd (Behavior Driven Development)
Bdd (Behavior Driven Development)Bdd (Behavior Driven Development)
Bdd (Behavior Driven Development)
 
Mass Media
Mass MediaMass Media
Mass Media
 
managing change in the digital environment
managing change in the digital environmentmanaging change in the digital environment
managing change in the digital environment
 
BDD-Driven Microservices
BDD-Driven MicroservicesBDD-Driven Microservices
BDD-Driven Microservices
 
Effects of social networking
Effects of social networkingEffects of social networking
Effects of social networking
 
Rolf Russel - system thinking
Rolf Russel - system thinkingRolf Russel - system thinking
Rolf Russel - system thinking
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
 
Ill effects of mobile
Ill effects of mobileIll effects of mobile
Ill effects of mobile
 
Introduction to User Experience - Mike Biggs
Introduction to User Experience - Mike BiggsIntroduction to User Experience - Mike Biggs
Introduction to User Experience - Mike Biggs
 

Similar to Behaviour-Driven Development: Writing software that matters

Why Your Agile Rollout Is Failing
Why Your Agile Rollout Is FailingWhy Your Agile Rollout Is Failing
Why Your Agile Rollout Is FailingDan North
 
An idea in a making
An idea in a makingAn idea in a making
An idea in a makingLisa Tyboni
 
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETNDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETjbandi
 
Devnology back toschool software reengineering
Devnology back toschool software reengineeringDevnology back toschool software reengineering
Devnology back toschool software reengineeringDevnology
 
Introduction to Optimization Group
Introduction to Optimization GroupIntroduction to Optimization Group
Introduction to Optimization GroupTom_Thompson
 
Lean & agile 101 for Astute Entrepreneurs
Lean & agile 101 for Astute EntrepreneursLean & agile 101 for Astute Entrepreneurs
Lean & agile 101 for Astute EntrepreneursClaudio Perrone
 
Exemplar: Designing Sensor-based interactions by demonstration... (a CHI2007 ...
Exemplar: Designing Sensor-based interactions by demonstration... (a CHI2007 ...Exemplar: Designing Sensor-based interactions by demonstration... (a CHI2007 ...
Exemplar: Designing Sensor-based interactions by demonstration... (a CHI2007 ...bjoern611
 
Building a DevOps Team that isn't Evil
Building a DevOps Team that isn't EvilBuilding a DevOps Team that isn't Evil
Building a DevOps Team that isn't EvilIBM UrbanCode Products
 
Cs 1023 lec 4 (week 1)
Cs 1023 lec 4 (week 1)Cs 1023 lec 4 (week 1)
Cs 1023 lec 4 (week 1)stanbridge
 
Yes But What Do We Do?
Yes But What Do We Do?Yes But What Do We Do?
Yes But What Do We Do?John Caswell
 
A Grand Unified Theory of Software
A Grand Unified Theory of SoftwareA Grand Unified Theory of Software
A Grand Unified Theory of Softwarevinod_dinakaran
 
Splunk September 2023 User Group PDX.pdf
Splunk September 2023 User Group PDX.pdfSplunk September 2023 User Group PDX.pdf
Splunk September 2023 User Group PDX.pdfAmanda Richardson
 
Product Development 230109
Product Development 230109Product Development 230109
Product Development 230109Espen Sivertsen
 
A Developers Take on Cooper
A Developers Take on CooperA Developers Take on Cooper
A Developers Take on CooperAdam Jordens
 
Execute for Every Screen
Execute for Every ScreenExecute for Every Screen
Execute for Every ScreenSteven Hoober
 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioSrini Penchikala
 
Pnp Agile Tech Ed India
Pnp Agile Tech Ed IndiaPnp Agile Tech Ed India
Pnp Agile Tech Ed Indiarsnarayanan
 
Collaboration Tools to Create Better Products
Collaboration Tools to Create Better ProductsCollaboration Tools to Create Better Products
Collaboration Tools to Create Better ProductsEnthiosys Inc
 

Similar to Behaviour-Driven Development: Writing software that matters (20)

Why Your Agile Rollout Is Failing
Why Your Agile Rollout Is FailingWhy Your Agile Rollout Is Failing
Why Your Agile Rollout Is Failing
 
ASE01.ppt
ASE01.pptASE01.ppt
ASE01.ppt
 
An idea in a making
An idea in a makingAn idea in a making
An idea in a making
 
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETNDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
 
Devnology back toschool software reengineering
Devnology back toschool software reengineeringDevnology back toschool software reengineering
Devnology back toschool software reengineering
 
Methodology
MethodologyMethodology
Methodology
 
Introduction to Optimization Group
Introduction to Optimization GroupIntroduction to Optimization Group
Introduction to Optimization Group
 
Lean & agile 101 for Astute Entrepreneurs
Lean & agile 101 for Astute EntrepreneursLean & agile 101 for Astute Entrepreneurs
Lean & agile 101 for Astute Entrepreneurs
 
Exemplar: Designing Sensor-based interactions by demonstration... (a CHI2007 ...
Exemplar: Designing Sensor-based interactions by demonstration... (a CHI2007 ...Exemplar: Designing Sensor-based interactions by demonstration... (a CHI2007 ...
Exemplar: Designing Sensor-based interactions by demonstration... (a CHI2007 ...
 
Building a DevOps Team that isn't Evil
Building a DevOps Team that isn't EvilBuilding a DevOps Team that isn't Evil
Building a DevOps Team that isn't Evil
 
Cs 1023 lec 4 (week 1)
Cs 1023 lec 4 (week 1)Cs 1023 lec 4 (week 1)
Cs 1023 lec 4 (week 1)
 
Yes But What Do We Do?
Yes But What Do We Do?Yes But What Do We Do?
Yes But What Do We Do?
 
A Grand Unified Theory of Software
A Grand Unified Theory of SoftwareA Grand Unified Theory of Software
A Grand Unified Theory of Software
 
Splunk September 2023 User Group PDX.pdf
Splunk September 2023 User Group PDX.pdfSplunk September 2023 User Group PDX.pdf
Splunk September 2023 User Group PDX.pdf
 
Product Development 230109
Product Development 230109Product Development 230109
Product Development 230109
 
A Developers Take on Cooper
A Developers Take on CooperA Developers Take on Cooper
A Developers Take on Cooper
 
Execute for Every Screen
Execute for Every ScreenExecute for Every Screen
Execute for Every Screen
 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio
 
Pnp Agile Tech Ed India
Pnp Agile Tech Ed IndiaPnp Agile Tech Ed India
Pnp Agile Tech Ed India
 
Collaboration Tools to Create Better Products
Collaboration Tools to Create Better ProductsCollaboration Tools to Create Better Products
Collaboration Tools to Create Better Products
 

More from Skills Matter

5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard LawrenceSkills Matter
 
Patterns for slick database applications
Patterns for slick database applicationsPatterns for slick database applications
Patterns for slick database applicationsSkills Matter
 
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmScala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmSkills Matter
 
Oscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimOscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimSkills Matter
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Skills Matter
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlCukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlSkills Matter
 
Cukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsCukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsSkills Matter
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Skills Matter
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Skills Matter
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldProgressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldSkills Matter
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Skills Matter
 
Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Skills Matter
 
A poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingA poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingSkills Matter
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveSkills Matter
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSkills Matter
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tSkills Matter
 

More from Skills Matter (20)

5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence
 
Patterns for slick database applications
Patterns for slick database applicationsPatterns for slick database applications
Patterns for slick database applications
 
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmScala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
 
Oscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimOscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheim
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlCukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberl
 
Cukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsCukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.js
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldProgressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source world
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
 
Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#
 
A poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingA poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testing
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-dive
 
Serendipity-neo4j
Serendipity-neo4jSerendipity-neo4j
Serendipity-neo4j
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
 
Plug 20110217
Plug   20110217Plug   20110217
Plug 20110217
 
Lug presentation
Lug presentationLug presentation
Lug presentation
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_t
 
Plug saiku
Plug   saikuPlug   saiku
Plug saiku
 

Recently uploaded

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Recently uploaded (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

Behaviour-Driven Development: Writing software that matters

  • 1. Behaviour-Driven Development Writing software that matters Dan North, ThoughtWorks Liz Keogh, Lunivore
  • 2. Part 1: Software that doesn’t matter 2 © Dan North, ThoughtWorks
  • 3. Failure modes – a field guide The project comes in late ...or costs too much to finish The application does the wrong thing It is unstable in production It breaks the rules The code is impossible to work with 3 © Dan North, ThoughtWorks
  • 4. How we deliver software Planning Analysis Design Deploy Code Test t Why do we do this? 4 © Dan North, ThoughtWorks
  • 5. The exponential change curve $ Planning Analysis Design Deploy Code Test t 5 © Dan North, ThoughtWorks
  • 6. The exponential change curve $ We fear this... so we do t which this... reinforces this! 6 © Dan North, ThoughtWorks
  • 7. If only we could deliver better... Deliver features rather than modules Prioritise often, change often Only focus on high-value features Flatten the cost of change Adapt to feedback Learn! 7 © Dan North, ThoughtWorks
  • 8. What we would need Adaptive planning Streaming requirements Evolving design Code we can change Frequent code integration Run all the regression tests often Frequent deployments 8 © Dan North, ThoughtWorks
  • 9. Part 2: Software that matters 9 © Dan North, ThoughtWorks
  • 10. A loose definition of BDD “Behaviour-driven development is about implementing an application by describing its behaviour from the perspective of its stakeholders” - Me  10 © Dan North, ThoughtWorks
  • 11. A more formal definition of BDD “BDD is a second-generation, outside-in, pull-based, multiple- stakeholder, multiple-scale, high- automation, agile methodology. “It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters.” 11 © Dan North, ThoughtWorks
  • 12. ...second generation... BDD is derivative Derives from: XP, especially TDD and CI Acceptance Test-Driven Planning Lean principles Domain-Driven Design Influenced by: Neurolinguistic Programming (NLP) Systems Thinking 12 © Dan North, ThoughtWorks
  • 13. ...cycle of interactions... BDD in six pictures 13 © Dan North, ThoughtWorks
  • 14. ...cycle of interactions... The roles in a BDD team The stakeholders The analysts (or BAs) The testers (or QAs) The developers The project manager (or Boss) 14 © Dan North, ThoughtWorks
  • 15. ...outside-in... Who is this application for? Vision (or Purpose) Outcome Outcome Outcome Feature set Feature set Feature set Feature set Features... Features... Features... ... Stories... Stories... ... Scenarios... ... 15 © Dan North, ThoughtWorks
  • 16. ...clearly-defined outputs... What’s in a story? A story is a unit of delivery Story 28 - View patient details As an Anaesthetist I want to view the Patient’s surgical history So that I can choose the most suitable gas 16 © Dan North, ThoughtWorks
  • 17. ...clearly-defined outputs... Focus on the value Story 28 - View patient details In order to choose the most suitable gas an Anaesthetist wants to view the Patient’s surgical history 17 © Dan North, ThoughtWorks
  • 18. ...clearly-defined outputs... Focus on the value Story 29 – Log patient details In order to choose the most suitable gas an Anaesthetist wants other Anaesthetists to log the Patient’s surgical history for later retrieval 18 © Dan North, ThoughtWorks
  • 19. ...clearly-defined outputs... Agree on “done” Define scope using scenarios Scenario – existing patient with history Given we have a patient on file And the patient has had previous surgery When I request the Patient’s surgical history Then I see all the previous treatments 19 © Dan North, ThoughtWorks
  • 20. ...clearly-defined outputs... Automate the scenarios Make each step executable Given we have a patient on file In Ruby: Given “we have a patient on file” do # ... end In Java: @Given(“we have a patient on file”) public void createPatientOnFile() { // ... } 20 © Dan North, ThoughtWorks
  • 21. ...clearly-defined outputs... Code-by-example to implement Also known as TDD Start at the edges, with what you know Implement outermost objects and operations Discover collaborators, working inwards and mock them out for now Repeat until “Done” If the model doesn’t “feel” right, experiment! 21 © Dan North, ThoughtWorks
  • 22. ...clearly-defined outputs... Code-by-example example Scenario Examples Scenario 22 © Dan North, ThoughtWorks
  • 23. ...clearly-defined outputs... Good tools can help here Cucumber or JBehave for stories RSpec, XUnit for code examples Mockito, Mocha, Moq for mocking Be opinionated rather than dogmatic with the tooling! 23 © Dan North, ThoughtWorks
  • 24. ...clearly-defined outputs... We keep the development artifacts Examples become code tests …and documentation Scenarios become acceptance tests which become regression tests ...and documentation Automation is key 24 © Dan North, ThoughtWorks
  • 25. Part 3: Getting the words right 25 © Dan North, ThoughtWorks
  • 26. 26 © Dan North, ThoughtWorks
  • 27. Domain-driven design 101 Model your domain ...and identify the core domain Create a shared language ...and make it ubiquitous Determine the model’s bounded context ...and think about what happens at the edges 27 © Dan North, ThoughtWorks
  • 28. The map is not the territory There are many kinds of model Each is useful in different contexts There is no “perfect” domain model So don’t try to create one! Domain modelling takes practice 28 © Dan North, ThoughtWorks
  • 29. A legacy domain modelling example Map<int, Map<int, int>> portfolioIdsByTraderId; if (portfolioIdsByTraderId.get(trader.getId()) .containsKey(portfolio.getId())) {...} becomes: if (trader.canView(portfolio)) {...} 29 © Dan North, ThoughtWorks
  • 30. We often manage multiple domains You want to retrieve patient records in Java, using Hibernate so you define class HibernatePatientRecordRepository { What if your IDE did domain-specific fonts? 30 © Dan North, ThoughtWorks
  • 31. Writing effective stories Each story represents (part of) a feature and each feature belongs to a stakeholder Each stakeholder represents a domain even the incidental stakeholders Mixing domains within a scenario leads to brittle tests What exactly is the scenario verifying? What does it mean when things change? “What does the stakeholder want from this story?” 31 © Dan North, ThoughtWorks
  • 32. Conclusion 32 © Dan North, ThoughtWorks
  • 33. Software that matters ...has tangible stakeholder value ...is delivered on time, incrementally ...is easy to deploy and manage ...is robust in production ...is easy to understand and communicate BDD is a step in that direction 33 © Dan North, ThoughtWorks
  • 34. Thank you Any questions? dan.north@thoughtworks.com http://dannorth.net @tastapod liz@lunivore.com http://lizkeogh.com @lunivore Google Group: BehaviorDrivenDevelopment 34 © Dan North, ThoughtWorks
  • 35. Bibliography Extreme Programming explained (2nd edition) - Kent Beck Domain-Driven Design - Eric Evans The Art of Systems Thinking and The Way of NLP - Joseph O’Connor 35 © Dan North, ThoughtWorks