Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Using Behaviour Driven Development to
       Enhance Scrum Team Dynamics




John	
  Ferguson	
  Smart
Consulta
                    nt
            Trainer
           Mentor
           Author
          Speaker
          Coder
John Fer
         guson S
                 mar t
There are only two problems
  in software development

1) Building the software wrong

2) Building the wrong software
50-­‐80%	
  of	
  produc.on	
  code	
  is	
  never	
  or	
  rarely	
  used
Poor	
  quality	
  costs	
  money!
Payroll	
  System
Ini:al	
  Budget       $6	
  million

Cost	
  by	
  2012                     $416	
  million

Es:mated	
  cost	
  
  to	
  complete                                         $837	
  million
Payroll	
  System
Project success = right product + built right
Building the
             right thing



 Features aligned
 to business needs
                                                                  Right product,
                                                                   built right

Wasted effort
                              Doesn't
                                       do wha
                              the use         t
                                      r wants
                What




                                            e
                               Project lat




                                                             Hard to
                                                             change
                        Over bu
                                                 sive to

                                    dget
                                              aintain
                            le
                           Unstab




                                           Expen



    Misaligned
                                            m



   requirements
                                                                                       Building the
                                                                                        thing right
                                                       How
                       Poor craftsmanship                                 Quality
                                                               Bugs    craftsmanship
BDD
The Drive for Value
Behaviour Driven Development is...

               Conversation
                 Focused
Behaviour Driven Development is...




 Example-based
Behaviour Driven Development is...




                           i o n
           u m pt
A s s
Behaviour Driven Development is...

               Value Driven
Behaviour Driven Development is...




        Ou
          ts
                id
                  e
                            In
Behaviour Driven Development is...
                      Business Analyst




                  A Common
                  Language
       Business                          Developer




                         Tester
Behaviour Driven Development is...


                    Executable
                   Specifications
Behaviour Driven Development is...



                            31%	
  faster	
  delivery
         Delivery	
  Time


                            Tradi.onal


                                         Using	
  BDD




                                                        More value faster
Behaviour Driven Development is...



                          4	
  .mes	
  less	
  defects
         Defect	
  Rate


                          Tradi.onal


                                       Using	
  BDD




                                                         Higher Quality
BDD
A concrete example
I	
  want	
  to	
  sell	
  train	
  
5cket	
  bookings	
  online              OK.	
  How	
  will	
  that	
  
                                           benefit	
  you?
Travellers	
  won’t	
  have	
  to	
  waste	
  8me	
  
  queuing	
  at	
  the	
  sta8on	
  any	
  more

                                                                So	
  you	
  might	
  say:
         Yes                                            	
  	
  In	
  order	
  to	
  save	
  ,me	
  by	
  avoiding	
  the	
  queue	
  at	
  the	
  sta,on
                                                        	
  	
  As	
  a	
  traveller
                                                                 I	
  want	
  to	
  book	
  my	
  ,cket	
  online
So	
  why	
  do	
  we	
  care?

     People	
  hate	
  queueing.	
  More	
                                      Aha!	
  So	
  it’s	
  about	
  selling	
  
people	
  will	
  buy	
  train	
  8ckets	
  if	
  they	
  don't	
               more	
  8ckets!
                   have	
  to	
  queue.

            Yes
So	
  we	
  could	
  say	
  this:
                   	
  In	
  order	
  to	
  increase	
  ,cket	
  sales
I	
  guess	
  so   	
  As	
  a	
  rail	
  service
                    	
  I	
  want	
  travellers	
  to	
  be	
  able	
  to	
  save	
  ,me	
  by	
  booking	
  online
Can	
  you	
  give	
  me	
  an	
  example	
  of	
  how	
  someone	
  might	
  
                                                                     book	
  a	
  train	
  8cket	
  online?

Sure.	
  A	
  traveller	
  buys	
  a	
  8cket	
  
online	
  from	
  Dubbo	
  to	
  Sydney.
                                                                                                                Which	
  would	
  cost?
                                                          $25




                                          So	
  we	
  could	
  say:
                                          Given	
  Jane	
  wants	
  to	
  take	
  a	
  train	
  from	
  Dubbo	
  to	
  Sydney
                                          When	
  she	
  books	
  a	
  ,cket	
  online
                                          Then	
  she	
  should	
  be	
  charged	
  $25
Hmm.	
  So	
  every	
  traveller	
  pays	
  the	
  same	
  price?


    Of	
  course	
  not!	
  A	
  pensionner	
  
  would	
  only	
  pay	
  $20,	
  for	
  example.




     Ok.	
  So	
  let’s	
  add	
  that	
  example	
  too:
	
  	
  	
  	
  Given	
  Joe	
  wants	
  to	
  take	
  a	
  train	
  from	
  Dubbo	
  to	
  Sydney
	
  	
  	
  	
  And	
  Joe	
  has	
  a	
  pension	
  card	
  
	
  	
  	
  	
  When	
  he	
  books	
  a	
  ,cket	
  online
	
  	
  	
  	
  Then	
  he	
  should	
  be	
  charged	
  $20
     	
  	
  	
  And	
  he	
  should	
  be	
  issued	
  with	
  a	
  valid	
  ,cket
Can	
  you	
  give	
  me	
  any	
  other	
  examples	
  of	
  
                                                             people	
  who	
  don’t	
  pay	
  $25	
  for	
  this	
  trip?

Yes,	
  we	
  give	
  students	
  a	
  30%	
  
                discount




                                                                                     Let’s	
  put	
  this	
  in	
  a	
  table




                                     Trip base cost   Concession type                  Expected Price
                                     $25              Pensioner                        $20
                                     $25              Military                         $20
                                     $25              Student                          $17.50
                                     $25              Under 12                         $12.50
                                     $25              Under 3                          $0.00
So what did we just do?
I	
  want	
  to	
  sell	
  train	
  
  5cket	
  bookings	
  online




1) Identify a feature
I	
  want	
  to	
  sell	
  train	
  
 5cket	
  bookings	
  online

                                          To	
  increase	
  
                                          5cket	
  sales

2) Understand why
I	
  want	
  to	
  sell	
  train	
  
5cket	
  bookings	
  online

                                                        To	
  increase	
  
                                                        5cket	
  sales

3) Find examples
     Given	
  Jane	
  wants	
  to	
  take	
  a	
  train	
  from	
  Dubbo	
  to	
  Sydney
     When	
  she	
  books	
  a	
  ,cket	
  online
     Then	
  she	
  should	
  be	
  charged	
  $25
I	
  want	
  to	
  sell	
  train	
  
          5cket	
  bookings	
  online

                                                                              To	
  increase	
  
                                                                              5cket	
  sales

4) Challenge assumptions
                   Given	
  Jane	
  wants	
  to	
  take	
  a	
  train	
  from	
  Dubbo	
  to	
  Sydney
                   When	
  she	
  books	
  a	
  ,cket	
  online
                   Then	
  she	
  should	
  be	
  charged	
  $25

    	
  	
  	
  Given	
  Joe	
  wants	
  to	
  take	
  a	
  train	
  from	
  Dubbo	
  to	
  Sydney
   	
  	
  	
  	
  And	
  Joe	
  has	
  a	
  pension	
  card	
  
   	
  	
  	
  	
  When	
  he	
  books	
  a	
  ,cket	
  online
   	
  	
  	
  	
  Then	
  he	
  should	
  be	
  charged	
  $20
    	
  	
  	
  And	
  he	
  should	
  be	
  issued	
  with	
  a	
  valid	
  ,cket
I	
  want	
  to	
  sell	
  train	
  
                        5cket	
  bookings	
  online

                                                                                            To	
  increase	
  
                                                                                            5cket	
  sales

                 5) Extend our model
                          Given	
  Jane	
  wants	
  to	
  take	
  a	
  train	
  from	
  Dubbo	
  to	
  Sydney
                          When	
  she	
  books	
  a	
  ,cket	
  online
Trip base cost     Concession type should	
  Expected Price
                          Then	
  she	
           be	
  charged	
  $25
$25                        Pensioner                                   $20
                  	
  	
  	
  Given	
  Joe	
  wants	
  to	
  take	
  a	
  train	
  from	
  Dubbo	
  to	
  Sydney
$25                        Military                                    $20
                 	
  	
  	
  	
  And	
  Joe	
  has	
  a	
  pension	
  card	
  
$25              	
  	
  	
  Studente	
  books	
  a	
  ,cket	
  online
                             	
  When	
  h                             $17.50
$25              	
  	
  	
  Underh12 hould	
  be	
  charged	
  $20
                             	
  Then	
   e	
  s                       $12.50
                  	
  	
  	
  And	
  he	
  should	
  be	
  issued	
  with	
  a	
  valid	
  ,cket
$25                        Under 3                                     $0.00
And now we can automate
Now	
  we	
  can	
  automate	
  the	
  acceptance	
  criteria

   Trip base cost       Concession type      Expected Price
   $25                  Pensioner            $20
   $25                  Military             $20
   $25                  Student              $17.50
   $25                  Under 12             $12.50
   $25                  Under 3              $0.00



Acceptance criteria
Now	
  we	
  can	
  automate	
  the	
  acceptance	
  criteria

 Trip base cost        Concession type     Expected Price
 $25                   Pensioner           $20
 $25                   Military            $20
 $25                   Student             $17.50
 $25                   Under 12            $12.50
 $25                   Under 3             $0.00




Automated acceptance criteria
Now	
  we	
  can	
  automate	
  the	
  acceptance	
  criteria

   Trip base cost       Concession type      Expected Price
   $25                  Pensioner            $20
   $25                  Military             $20
   $25                  Student              $17.50
   $25                  Under 12             $12.50
   $25                  Under 3              $0.00




Living Documentation
BDD also applies to coding
We are always writing the
specifications for something
Low level specifications
                  Also act as technical documentation
High Level BDD
What features should we build?
Automated acceptance criteria
 Written for the whole team




                                             Spock



                                       Low Level BDD
                                      How do we build them?
                                 Low level specification and design
                                       Written for developers
BDD and the
Product Backlog
 A story of focus
What should we build next?
Backlog   Next Sprint




             ?
Backlog           Next Sprint




                     ?
 $$$$$$$

 $$$$$$$

   $$$$$$

    $$$$$

     $$$$

      $$$

       $$$

           $$$

            $$$

            $$$
But what about
Minimum Marketable Features?
Backlog            Next Sprint

             {
                                       ?
 Minimum           $$$$$$$
Marketable
Feature 1          $$$$$$$

                     $$$$$$

                      $$$$$



               {
   Minimum
                       $$$$
  Marketable
   Feature 2            $$$

                         $$$

                             $$$

                              $$$

                              $$$
Minimum Marketable Features
            or
  Minimum Viable Product?
How long would it take you to
  rewrite your last project?
“Ignorance is the constraint”
                       - Liz Keogh
"Ignorance more frequently begets
  confidence than does knowledge"
                 - Charles Darwin
Software development is a process of
   Continual Incremental Learning



     Known
    Unknowns

                      Unknown
                      Unknowns
"Scientia potentia est"
  Knowledge is power
   - Sir Francis Bacon
Learning has value


What stories will reduce our ignorance the most?
Backlog           Next Sprint




                     ?
 $$$$$$$

 $$$$$$$

   $$$$$$

    $$$$$

     $$$$

      $$$

       $$$

           $$$

            $$$

            $$$
Backlog               Next Sprint




                         ?
 ???????

 ???????

   ??????

    ?????

     ????

       ???

           ???

            ???

             ??

                  ?
Hunt	
  the	
  value!
What do you want to achieve?

                                 Vision           What will the business get out of it?


                                 Goals              What do users and stakeholders
                                                     need to deliver these goals?

                              Capabilities                  How can our application
                                                            help the users to do this?

    We can break a              Features
 feature up into stories

                                 Stories
Concrete examples are
easier to understand
                               Scenarios

   Are we
 there yet?                Acceptance Criteria



                                 Code
A business goal should
   1) Increase Revenue
      2) Reduce Costs
    3) Protect Revenue
   4) Avoid future costs
But who knows what the real goals are?
Chances	
  of	
  
  knowing


                    Senior	
  Management


                                           Product	
  Owners



                                                               Scrum	
  Masters


                                                                                  Business	
  Analysts


                                                                                                         Testers




                                                                                                                                          Developers
                                                                                                                   Role	
  in	
  the	
  organiza8on
Every story will provide value to
          the business




              What makes you so sure?
Can you map each story back to a
         business goal?
Requirements analysis is built on assumptions
                                           
                Goal
                                                              ti on
    To	
  increase	
  8cket	
  sale	
  
                                                 su mp
              revenue                      As

                                                                                      ti on
                                                                                  u mp
                                                                          ss
                                                Capability
                                          Sell	
  8ckets	
  online      A
   “Selling tickets
 online will increase
        sales”                                                                    Feature
                                                                     Pay	
  by	
  any	
  credit	
  card
                               “More credit card
                                  support will
                                increase online
                                     sales”
How can you validate your assumptions?                                                                   
               Goal
                                                            ti on
   To	
  increase	
  8cket	
  sale	
  
                                                su mp
             revenue                      As

                                                                                        ti on
                                                                Text
                                                                                    u mp
                                                                            ss
                                               Capability
                                         Sell	
  8ckets	
  online         A
  “Selling tickets
online will increase
       sales”                                                                       Feature
                                                                       Pay	
  by	
  any	
  credit	
  card
                              “More credit card
                                 support will
                               increase online
                                    sales”
                                         ...by measuring the outcomes
Impact Mapping
              a visual approach to identifying assumptions


    Why            Who              How              What

                                                                 concessions

                                                online booking

To increase      travellers   take the train
                                                                 credit card
ticket sale                     more often
                                                                  payment
  revenue


                               suggest taking   social network
                                the train to      integration
                                  friends
1)	
  Iden.fy	
  your	
  assump.ons

2)	
  Measure	
  the	
  outcomes

3)	
  Verify	
  your	
  assump.ons
BDD and team
   dynamics

Collaboration like you mean it
How do you build
                a feature?
Story

                  WASTE

                      bug	
  reports


        Working	
  
         code


                         boring	
  
                         manual	
  
                         tes5ng
How do you build
                                        a feature?
                  Story
                 Examples
                Automated	
  
                acceptance	
  
   Shared	
       criteria
understanding
                          Working	
  code	
  
                               and	
  
                        Working	
  Automated	
  
                         Acceptance	
  Tests
                                                   Exploratory	
  tes5ng,	
  
                                                    usability	
  tes5ng...
Tips and tricks

When the rubber hits the road
71
72

"Don't tell people how to do things, tell them what to
      do and let them surprise you with their results"
                                    - George S. Patton
73
74
75




Tailor
your
reporting
76


You	
  are	
  allowed	
  to	
  ask	
  ques.ons
John	
  Ferguson	
  Smart




Questions?

More Related Content

Bdd and Scrum Team Dynamics

  • 1. Using Behaviour Driven Development to Enhance Scrum Team Dynamics John  Ferguson  Smart
  • 2. Consulta nt Trainer Mentor Author Speaker Coder John Fer guson S mar t
  • 3. There are only two problems in software development 1) Building the software wrong 2) Building the wrong software
  • 4. 50-­‐80%  of  produc.on  code  is  never  or  rarely  used
  • 6. Payroll  System Ini:al  Budget $6  million Cost  by  2012 $416  million Es:mated  cost   to  complete $837  million
  • 8. Project success = right product + built right
  • 9. Building the right thing Features aligned to business needs Right product, built right Wasted effort Doesn't do wha the use t r wants What e Project lat Hard to change Over bu sive to dget aintain le Unstab Expen Misaligned m requirements Building the thing right How Poor craftsmanship Quality Bugs craftsmanship
  • 11. Behaviour Driven Development is... Conversation Focused
  • 12. Behaviour Driven Development is... Example-based
  • 13. Behaviour Driven Development is... i o n u m pt A s s
  • 14. Behaviour Driven Development is... Value Driven
  • 15. Behaviour Driven Development is... Ou ts id e In
  • 16. Behaviour Driven Development is... Business Analyst A Common Language Business Developer Tester
  • 17. Behaviour Driven Development is... Executable Specifications
  • 18. Behaviour Driven Development is... 31%  faster  delivery Delivery  Time Tradi.onal Using  BDD More value faster
  • 19. Behaviour Driven Development is... 4  .mes  less  defects Defect  Rate Tradi.onal Using  BDD Higher Quality
  • 21. I  want  to  sell  train   5cket  bookings  online OK.  How  will  that   benefit  you?
  • 22. Travellers  won’t  have  to  waste  8me   queuing  at  the  sta8on  any  more So  you  might  say: Yes    In  order  to  save  ,me  by  avoiding  the  queue  at  the  sta,on    As  a  traveller I  want  to  book  my  ,cket  online
  • 23. So  why  do  we  care? People  hate  queueing.  More   Aha!  So  it’s  about  selling   people  will  buy  train  8ckets  if  they  don't   more  8ckets! have  to  queue. Yes
  • 24. So  we  could  say  this:  In  order  to  increase  ,cket  sales I  guess  so  As  a  rail  service  I  want  travellers  to  be  able  to  save  ,me  by  booking  online
  • 25. Can  you  give  me  an  example  of  how  someone  might   book  a  train  8cket  online? Sure.  A  traveller  buys  a  8cket   online  from  Dubbo  to  Sydney. Which  would  cost? $25 So  we  could  say: Given  Jane  wants  to  take  a  train  from  Dubbo  to  Sydney When  she  books  a  ,cket  online Then  she  should  be  charged  $25
  • 26. Hmm.  So  every  traveller  pays  the  same  price? Of  course  not!  A  pensionner   would  only  pay  $20,  for  example. Ok.  So  let’s  add  that  example  too:        Given  Joe  wants  to  take  a  train  from  Dubbo  to  Sydney        And  Joe  has  a  pension  card          When  he  books  a  ,cket  online        Then  he  should  be  charged  $20      And  he  should  be  issued  with  a  valid  ,cket
  • 27. Can  you  give  me  any  other  examples  of   people  who  don’t  pay  $25  for  this  trip? Yes,  we  give  students  a  30%   discount Let’s  put  this  in  a  table Trip base cost Concession type Expected Price $25 Pensioner $20 $25 Military $20 $25 Student $17.50 $25 Under 12 $12.50 $25 Under 3 $0.00
  • 28. So what did we just do?
  • 29. I  want  to  sell  train   5cket  bookings  online 1) Identify a feature
  • 30. I  want  to  sell  train   5cket  bookings  online To  increase   5cket  sales 2) Understand why
  • 31. I  want  to  sell  train   5cket  bookings  online To  increase   5cket  sales 3) Find examples Given  Jane  wants  to  take  a  train  from  Dubbo  to  Sydney When  she  books  a  ,cket  online Then  she  should  be  charged  $25
  • 32. I  want  to  sell  train   5cket  bookings  online To  increase   5cket  sales 4) Challenge assumptions Given  Jane  wants  to  take  a  train  from  Dubbo  to  Sydney When  she  books  a  ,cket  online Then  she  should  be  charged  $25      Given  Joe  wants  to  take  a  train  from  Dubbo  to  Sydney        And  Joe  has  a  pension  card          When  he  books  a  ,cket  online        Then  he  should  be  charged  $20      And  he  should  be  issued  with  a  valid  ,cket
  • 33. I  want  to  sell  train   5cket  bookings  online To  increase   5cket  sales 5) Extend our model Given  Jane  wants  to  take  a  train  from  Dubbo  to  Sydney When  she  books  a  ,cket  online Trip base cost Concession type should  Expected Price Then  she   be  charged  $25 $25 Pensioner $20      Given  Joe  wants  to  take  a  train  from  Dubbo  to  Sydney $25 Military $20        And  Joe  has  a  pension  card   $25      Studente  books  a  ,cket  online  When  h $17.50 $25      Underh12 hould  be  charged  $20  Then   e  s $12.50      And  he  should  be  issued  with  a  valid  ,cket $25 Under 3 $0.00
  • 34. And now we can automate
  • 35. Now  we  can  automate  the  acceptance  criteria Trip base cost Concession type Expected Price $25 Pensioner $20 $25 Military $20 $25 Student $17.50 $25 Under 12 $12.50 $25 Under 3 $0.00 Acceptance criteria
  • 36. Now  we  can  automate  the  acceptance  criteria Trip base cost Concession type Expected Price $25 Pensioner $20 $25 Military $20 $25 Student $17.50 $25 Under 12 $12.50 $25 Under 3 $0.00 Automated acceptance criteria
  • 37. Now  we  can  automate  the  acceptance  criteria Trip base cost Concession type Expected Price $25 Pensioner $20 $25 Military $20 $25 Student $17.50 $25 Under 12 $12.50 $25 Under 3 $0.00 Living Documentation
  • 38. BDD also applies to coding
  • 39. We are always writing the specifications for something
  • 40. Low level specifications Also act as technical documentation
  • 41. High Level BDD What features should we build? Automated acceptance criteria Written for the whole team Spock Low Level BDD How do we build them? Low level specification and design Written for developers
  • 42. BDD and the Product Backlog A story of focus
  • 43. What should we build next?
  • 44. Backlog Next Sprint ?
  • 45. Backlog Next Sprint ? $$$$$$$ $$$$$$$ $$$$$$ $$$$$ $$$$ $$$ $$$ $$$ $$$ $$$
  • 46. But what about Minimum Marketable Features?
  • 47. Backlog Next Sprint { ? Minimum $$$$$$$ Marketable Feature 1 $$$$$$$ $$$$$$ $$$$$ { Minimum $$$$ Marketable Feature 2 $$$ $$$ $$$ $$$ $$$
  • 48. Minimum Marketable Features or Minimum Viable Product?
  • 49. How long would it take you to rewrite your last project?
  • 50. “Ignorance is the constraint” - Liz Keogh
  • 51. "Ignorance more frequently begets confidence than does knowledge" - Charles Darwin
  • 52. Software development is a process of Continual Incremental Learning Known Unknowns Unknown Unknowns
  • 53. "Scientia potentia est" Knowledge is power - Sir Francis Bacon
  • 54. Learning has value What stories will reduce our ignorance the most?
  • 55. Backlog Next Sprint ? $$$$$$$ $$$$$$$ $$$$$$ $$$$$ $$$$ $$$ $$$ $$$ $$$ $$$
  • 56. Backlog Next Sprint ? ??????? ??????? ?????? ????? ???? ??? ??? ??? ?? ?
  • 58. What do you want to achieve? Vision What will the business get out of it? Goals What do users and stakeholders need to deliver these goals? Capabilities How can our application help the users to do this? We can break a Features feature up into stories Stories Concrete examples are easier to understand Scenarios Are we there yet? Acceptance Criteria Code
  • 59. A business goal should 1) Increase Revenue 2) Reduce Costs 3) Protect Revenue 4) Avoid future costs
  • 60. But who knows what the real goals are? Chances  of   knowing Senior  Management Product  Owners Scrum  Masters Business  Analysts Testers Developers Role  in  the  organiza8on
  • 61. Every story will provide value to the business What makes you so sure?
  • 62. Can you map each story back to a business goal?
  • 63. Requirements analysis is built on assumptions Goal ti on To  increase  8cket  sale   su mp revenue As ti on u mp ss Capability Sell  8ckets  online A “Selling tickets online will increase sales” Feature Pay  by  any  credit  card “More credit card support will increase online sales”
  • 64. How can you validate your assumptions? Goal ti on To  increase  8cket  sale   su mp revenue As ti on Text u mp ss Capability Sell  8ckets  online A “Selling tickets online will increase sales” Feature Pay  by  any  credit  card “More credit card support will increase online sales” ...by measuring the outcomes
  • 65. Impact Mapping a visual approach to identifying assumptions Why Who How What concessions online booking To increase travellers take the train credit card ticket sale more often payment revenue suggest taking social network the train to integration friends
  • 66. 1)  Iden.fy  your  assump.ons 2)  Measure  the  outcomes 3)  Verify  your  assump.ons
  • 67. BDD and team dynamics Collaboration like you mean it
  • 68. How do you build a feature? Story WASTE bug  reports Working   code boring   manual   tes5ng
  • 69. How do you build a feature? Story Examples Automated   acceptance   Shared   criteria understanding Working  code   and   Working  Automated   Acceptance  Tests Exploratory  tes5ng,   usability  tes5ng...
  • 70. Tips and tricks When the rubber hits the road
  • 71. 71
  • 72. 72 "Don't tell people how to do things, tell them what to do and let them surprise you with their results" - George S. Patton
  • 73. 73
  • 74. 74
  • 76. 76 You  are  allowed  to  ask  ques.ons