77
John Ferguson Smart Using Behaviour Driven Development to Enhance Scrum Team Dynamics

Bdd and Scrum Team Dynamics

Embed Size (px)

Citation preview

John  Ferguson  Smart

Using Behaviour Driven Development to Enhance Scrum Team Dynamics

John Ferguson Smart

ConsultantTrainerMentorAuthorSpeakerCoder

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!

Ini:al  Budget $6  million

Cost  by  2012 $416  million

Payroll  System

Es:mated  cost  to  complete $837  million

Payroll  System

Project success = right product + built right

Building the thing right

Building the right thing

Quality craftsmanship

Misaligned requirements

Features aligned to business needs

Poor craftsmanship

Wha

t

How

Expe

nsi

ve to

mai

nta

in

Un

stab

le Har

d to

ch

ange

Bugs

Over budget

Project late

Doesn't do what the user wants

Right product, built right

Wasted effort

BDDThe Drive for Value

Conversation Focused

Behaviour Driven Development is...

Example-based

Behaviour Driven Development is...

Behaviour Driven Development is...

Assumptio

n

Value DrivenBehaviour Driven Development is...

OutsideIn

Behaviour Driven Development is...

A Common Language

Business Developer

Business Analyst

Tester

Behaviour Driven Development is...

Executable Specifications

Behaviour Driven Development is...

More value faster

Delivery  Time

Trad

i.on

al

Using  BDD

31%  faster  delivery

Behaviour Driven Development is...

Higher Quality

Defect  Rate

Trad

i.on

al

Using  BDD

4  .mes  less  defects

Behaviour Driven Development is...

BDDA 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:    In  order  to  save  ,me  by  avoiding  the  queue  at  the  sta,on    As  a  travellerI  want  to  book  my  ,cket  online

Yes

People  hate  queueing.  More  people  will  buy  train  8ckets  if  they  don't  

have  to  queue.

So  why  do  we  care?

Aha!  So  it’s  about  selling  more  8ckets!

Yes

So  we  could  say  this:  In  order  to  increase  ,cket  sales  As  a  rail  service  I  want  travellers  to  be  able  to  save  ,me  by  booking  online

I  guess  so

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  SydneyWhen  she  books  a  ,cket  onlineThen  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

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

Let’s  put  this  in  a  table

So what did we just do?

1) Identify a feature

I  want  to  sell  train  5cket  bookings  online

2) Understand why

I  want  to  sell  train  5cket  bookings  online

To  increase  5cket  sales

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  SydneyWhen  she  books  a  ,cket  onlineThen  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  SydneyWhen  she  books  a  ,cket  onlineThen  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  SydneyWhen  she  books  a  ,cket  onlineThen  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

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

And now we can automate

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

Now  we  can  automate  the  acceptance  criteria

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

Now  we  can  automate  the  acceptance  criteria

Automated 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

Now  we  can  automate  the  acceptance  criteria

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 BDDWhat features should we build?Automated acceptance criteria

Written for the whole team

Low Level BDDHow do we build them?

Low level specification and designWritten for developers

Spock

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 MarketableFeature 1 {

{Minimum MarketableFeature 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

What stories will reduce our ignorance the most?

Learning has value

$$$$$

$$$$$$

$$$$

$$$

$$$

$$$

$$$$$$$

$$$$$$$

Backlog

$$$

$$$

Next Sprint

?

???????

???????

Backlog

??????

?????

????

???

???

???

??

?

Next Sprint

?

Hunt  the  value!

Vision

Goals

Capabilities

Features

Stories

Scenarios

Acceptance Criteria

Code

What do you want to achieve?

What will the business get out of it?

What do users and stakeholders need to deliver these goals?

How can our application help the users to do this?

Concrete examples are easier to understand

We can break a feature up into stories

Are we there yet?

A business goal should1) Increase Revenue

2) Reduce Costs3) Protect Revenue

4) Avoid future costs

Chances  of  knowing

But who knows what the real goals are?

Senior  M

anagem

ent

Prod

uct  O

wne

rs

Busin

ess  A

nalysts

Testers

Develope

rs

Role  in  the  organiza8on

Scrum  M

asters

Every story will provide value to the business

What makes you so sure?

Can you map each story back to a business goal?

\

GoalTo  increase  8cket  sale  

revenue

CapabilitySell  8ckets  online

FeaturePay  by  any  credit  card

Assumpti

on

Assumpti

on

Requirements analysis is built on assumptions

“Selling tickets online will increase

sales”

“More credit card support will

increase online sales”

\

GoalTo  increase  8cket  sale  

revenue

CapabilitySell  8ckets  online

FeaturePay  by  any  credit  card

Assumpti

on

Assumpti

on

“Selling tickets online will increase

sales”

“More credit card support will

increase online sales”

Text

How can you validate your assumptions?

...by measuring the outcomes

Impact Mapping a visual approach to identifying assumptions

To increase ticket sale revenue

Why Who How

travellers take the train more often

suggest taking the train to

friends

What

online booking

social network integration

concessions

credit card payment

1)  Iden.fy  your  assump.ons

2)  Measure  the  outcomes

3)  Verify  your  assump.ons

BDD and team dynamics

Collaboration like you mean it

Story

bug  reports

Working  code

boring  manual  tes5ng

WASTE

How do you build a feature?

Working  code  and  

Working  Automated  Acceptance  Tests

Exploratory  tes5ng,  usability  tes5ng...

How do you build a feature?

Shared  understanding

StoryExamplesAutomated  acceptance  criteria

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?