bdd: the unit test of the product owner

157
BDD The unit test of the product owner

Upload: wakaleo-consulting

Post on 19-Aug-2015

982 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: BDD: The unit test of the product owner

BDD

The unit test of the product owner

Page 2: BDD: The unit test of the product owner

John Ferguson Smart

Consultant  Trainer  Mentor  Author  Speaker  Coder

Page 3: BDD: The unit test of the product owner

John Ferguson Smart

Consultant  Trainer  Mentor  Author  Speaker  Coder

Page 4: BDD: The unit test of the product owner

John Ferguson Smart

Consultant  Trainer  Mentor  Author  Speaker  Coder

Page 5: BDD: The unit test of the product owner

John Ferguson Smart

Consultant  Trainer  Mentor  Author  Speaker  Coder

Page 6: BDD: The unit test of the product owner

So what is this BDD thing?

Page 7: BDD: The unit test of the product owner

Using examples

So what is this BDD thing?

Page 8: BDD: The unit test of the product owner

Using examples

a shared understanding

So what is this BDD thing?

Page 9: BDD: The unit test of the product owner

Using examples

a shared understanding

software that matters

So what is this BDD thing?

Page 10: BDD: The unit test of the product owner

BDD

So what is this BDD thing?

Page 11: BDD: The unit test of the product owner

BDDCollaboration

So what is this BDD thing?

Page 12: BDD: The unit test of the product owner

BDD

Hunting out value

Collaboration

So what is this BDD thing?

Page 13: BDD: The unit test of the product owner

BDD

Hunting out value

Collaboration

Building the right software

So what is this BDD thing?

Page 14: BDD: The unit test of the product owner

BDD

Hunting out value Automated Acceptance Criteria

Collaboration

Building the right software

So what is this BDD thing?

Page 15: BDD: The unit test of the product owner

BDD

Hunting out value Automated Acceptance Criteria

API and code design

Collaboration

Building the right software

So what is this BDD thing?

Page 16: BDD: The unit test of the product owner

BDD

Hunting out value Automated Acceptance Criteria

API and code design

Collaboration

Building the software right

Building the right software

So what is this BDD thing?

Page 17: BDD: The unit test of the product owner

BDD

Hunting out value Automated Acceptance Criteria

API and code design

Collaboration

Building the software right

Building the right software

Living Documentation

So what is this BDD thing?

Page 18: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 19: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 20: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 21: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 22: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 23: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 24: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 25: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 26: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 27: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 28: BDD: The unit test of the product owner

The business owner tells the business

analyst what he wants

12 The business

analyst writes a requirements

document

3 The developer translates the requirements into software

4 The tester translates the requirements

into test cases 5 The technical writer translates

the software into functional and technical

documentation

BDD in a nutshell

A traditional development process

Page 29: BDD: The unit test of the product owner

The business owner and the business

analyst have a conversation about

what he needs.

1

2

3

4 The tester uses these scenarios as the basis for

her tests

5

The automated tests provide feedback on progress and help

document the application

The business analyst, the developer and the tester elaborate the

requirements together.

The scenarios guide the developer and act as

automated tests

They define requirements as

structured, English-language format

"scenarios"

BDD in a nutshell

A BDD development process

Page 30: BDD: The unit test of the product owner

The business owner and the business

analyst have a conversation about

what he needs.

1

2

3

4 The tester uses these scenarios as the basis for

her tests

5

The automated tests provide feedback on progress and help

document the application

The business analyst, the developer and the tester elaborate the

requirements together.

The scenarios guide the developer and act as

automated tests

They define requirements as

structured, English-language format

"scenarios"

BDD in a nutshell

A BDD development process

Page 31: BDD: The unit test of the product owner

The business owner and the business

analyst have a conversation about

what he needs.

1

2

3

4 The tester uses these scenarios as the basis for

her tests

5

The automated tests provide feedback on progress and help

document the application

The business analyst, the developer and the tester elaborate the

requirements together.

The scenarios guide the developer and act as

automated tests

They define requirements as

structured, English-language format

"scenarios"

BDD in a nutshell

A BDD development process

Page 32: BDD: The unit test of the product owner

The business owner and the business

analyst have a conversation about

what he needs.

1

2

3

4 The tester uses these scenarios as the basis for

her tests

5

The automated tests provide feedback on progress and help

document the application

The business analyst, the developer and the tester elaborate the

requirements together.

The scenarios guide the developer and act as

automated tests

They define requirements as

structured, English-language format

"scenarios"

BDD in a nutshell

A BDD development process

Page 33: BDD: The unit test of the product owner

The business owner and the business

analyst have a conversation about

what he needs.

1

2

3

4 The tester uses these scenarios as the basis for

her tests

5

The automated tests provide feedback on progress and help

document the application

The business analyst, the developer and the tester elaborate the

requirements together.

The scenarios guide the developer and act as

automated tests

They define requirements as

structured, English-language format

"scenarios"

BDD in a nutshell

A BDD development process

Page 34: BDD: The unit test of the product owner

The business owner and the business

analyst have a conversation about

what he needs.

1

2

3

4 The tester uses these scenarios as the basis for

her tests

5

The automated tests provide feedback on progress and help

document the application

The business analyst, the developer and the tester elaborate the

requirements together.

The scenarios guide the developer and act as

automated tests

They define requirements as

structured, English-language format

"scenarios"

BDD in a nutshell

A BDD development process

Page 35: BDD: The unit test of the product owner

The business owner and the business

analyst have a conversation about

what he needs.

1

2

3

4 The tester uses these scenarios as the basis for

her tests

5

The automated tests provide feedback on progress and help

document the application

The business analyst, the developer and the tester elaborate the

requirements together.

The scenarios guide the developer and act as

automated tests

They define requirements as

structured, English-language format

"scenarios"

•Specifica8ons  are  elaborated  collabora8vely  •Specifica8ons  use  a  common  language  •Executable  specifica8ons  provide  fast  feedback

BDD in a nutshell

Page 36: BDD: The unit test of the product owner

“software that matters”

Building the thing right

Building the right thing

Wha

t

How

Mis

alig

ned

requ

irem

ents

Poor craftsmanship

Page 37: BDD: The unit test of the product owner

“software that matters”

Building the thing right

Building the right thing

Wha

t

How

Mis

alig

ned

requ

irem

ents

Poor craftsmanship

Solves the wrong problem well

Page 38: BDD: The unit test of the product owner

“software that matters”

Building the thing right

Building the right thing

Wha

t

How

Mis

alig

ned

requ

irem

ents

Poor craftsmanship

Solves the wrong problem well

Solves the right problem poorly

Page 39: BDD: The unit test of the product owner

“software that matters”

Building the thing right

Building the right thing

Wha

t

How

Mis

alig

ned

requ

irem

ents

Poor craftsmanship

Buggy and useless

Solves the wrong problem well

Solves the right problem poorly

Page 40: BDD: The unit test of the product owner

“software that matters”

Building the thing right

Building the right thing

Wha

t

How

Mis

alig

ned

requ

irem

ents

Poor craftsmanship

Buggy and useless

Slow to change

Solves the wrong problem well

Solves the right problem poorly

Page 41: BDD: The unit test of the product owner

“software that matters”

Building the thing right

Building the right thing

Wha

t

How

Mis

alig

ned

requ

irem

ents

Poor craftsmanship

Buggy and useless

Hard to maintain

Slow to change

Solves the wrong problem well

Solves the right problem poorly

Page 42: BDD: The unit test of the product owner

“software that matters”

Building the thing right

Building the right thing

Wha

t

How

Mis

alig

ned

requ

irem

ents

Poor craftsmanship

Buggy and useless

Hard to maintain

Slow to change

Does what the business needs Reliable Easy to maintain

Solves the wrong problem well

Solves the right problem poorly

Page 43: BDD: The unit test of the product owner

You don’t know what you don’t knowUnderstanding of what needs to be

delivered

Time

Page 44: BDD: The unit test of the product owner

You don’t know what you don’t knowUnderstanding of what needs to be

delivered

Time

Requirementsphase done

AnalysisPhase done

Page 45: BDD: The unit test of the product owner

You don’t know what you don’t knowUnderstanding of what needs to be

delivered

Time

Requirementsphase done

AnalysisPhase done

Page 46: BDD: The unit test of the product owner

You don’t know what you don’t knowUnderstanding of what needs to be

delivered

Time

Requirementsphase done

AnalysisPhase done

•Our  ignorance  decreases  over  8me  • It  does  not  decrease  at  a  linear  rate  • It  does  not  always  decrease  in  a  predictable  way

Page 47: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

“software that matters”

We  start  with  a  business  goal

Page 48: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

“software that matters”

We  start  with  a  business  goal

“Increase  *cket  sales  by  5%  over  the  next  year  by  encouraging  travelers  to  fly  with  Flying  High  

rather  than  with  a  rival  company.”

Page 49: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

“software that matters”

What  features  will  enable  us  to  deliver  this  goal?

FeaturesFeaturesFeatures

Page 50: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

“software that matters”

What  features  will  enable  us  to  deliver  this  goal?

FeaturesFeaturesFeaturesEarn  Frequent  Flyer  points  from  flights

Page 51: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

“software that matters”

What  features  will  enable  us  to  deliver  this  goal?

FeaturesFeaturesFeaturesEarn  Frequent  Flyer  points  from  flights

Earn  Frequent  Flyer  points  from  purchases

Page 52: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

“software that matters”

What  features  will  enable  us  to  deliver  this  goal?

FeaturesFeaturesFeaturesEarn  Frequent  Flyer  points  from  flights

Earn  Frequent  Flyer  points  from  purchases

View  Frequent  Flyer  account  balance  online

Page 53: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

“software that matters”

We  use  conversa8ons  around  examples  to  build  up  our  understanding  of  these  features  

FeaturesFeaturesFeatures FeaturesFeaturesExamples

Page 54: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

“software that matters”

We  use  conversa8ons  around  examples  to  build  up  our  understanding  of  these  features  

FeaturesFeaturesFeatures FeaturesFeaturesExamples

“A  new  Frequent  Flyer  member  starts  off  with  Bronze  status”

Page 55: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

“software that matters”

We  use  conversa8ons  around  examples  to  build  up  our  understanding  of  these  features  

FeaturesFeaturesFeatures FeaturesFeaturesExamples

“A  new  Frequent  Flyer  member  starts  off  with  Bronze  status”

“If  she  earns  300  points,  she  becomes  a  Silver  Frequent  Flyer  member”

Page 56: BDD: The unit test of the product owner

“Using examples”

Page 57: BDD: The unit test of the product owner

“Using examples”

•Explore  requirements  •Discover  what  we  don’t  know  •Clarify  ambigui8es  • Iden8fy  assump8ons  and  misunderstandings  

Page 58: BDD: The unit test of the product owner

“Using examples”“A  new  Frequent  Flyer  member  starts  off  with  Bronze  status”

•Explore  requirements  •Discover  what  we  don’t  know  •Clarify  ambigui8es  • Iden8fy  assump8ons  and  misunderstandings  

Page 59: BDD: The unit test of the product owner

“Using examples”“A  new  Frequent  Flyer  member  starts  off  with  Bronze  status”

“If  she  earns  300  points,  she  becomes  a  Silver  Frequent  Flyer  member”

•Explore  requirements  •Discover  what  we  don’t  know  •Clarify  ambigui8es  • Iden8fy  assump8ons  and  misunderstandings  

Page 60: BDD: The unit test of the product owner

“Using examples”“A  new  Frequent  Flyer  member  starts  off  with  Bronze  status”

“If  she  earns  300  points,  she  becomes  a  Silver  Frequent  Flyer  member”

“If  I  ask  for  the  details  about  the  flight  FH-­‐102,  I  should  see  that  it  is  a  Sydney  to  Hong  Kong  flight  that  leaves  at  11:55pm  ”

•Explore  requirements  •Discover  what  we  don’t  know  •Clarify  ambigui8es  • Iden8fy  assump8ons  and  misunderstandings  

Page 61: BDD: The unit test of the product owner

“Using examples”

We  express  the  examples  in  a  structured  format  using  simple  English  phrases

Page 62: BDD: The unit test of the product owner

“Using examples”

We  express  the  examples  in  a  structured  format  using  simple  English  phrases

Page 63: BDD: The unit test of the product owner

“Using examples”

We  express  the  examples  in  a  structured  format  using  simple  English  phrases

Page 64: BDD: The unit test of the product owner

“Using examples”

We  express  the  examples  in  a  structured  format  using  simple  English  phrases

Page 65: BDD: The unit test of the product owner

“Using examples”

The  automated  acceptance  criteria  guide  the  development  process

Page 66: BDD: The unit test of the product owner

“Using examples”

The  automated  acceptance  criteria  guide  the  development  process

Page 67: BDD: The unit test of the product owner

“Using examples”

The  automated  acceptance  criteria  guide  the  development  process

Page 68: BDD: The unit test of the product owner

“a shared understanding”

Page 69: BDD: The unit test of the product owner

“Having  the  conversa/on    is  more  important  than    

recording  the  conversa/on  is  more  important  than    

automa/ng  the  conversa/on”  -­‐  Liz  Keogh

“a shared understanding”

Page 70: BDD: The unit test of the product owner

BA

Developer

Tester

Many teams build features like this…

“a shared understanding”

Page 71: BDD: The unit test of the product owner

Story

BA

Developer

Tester

Many teams build features like this…

“a shared understanding”

Page 72: BDD: The unit test of the product owner

Story

Working  code

BA

Developer

Tester

Many teams build features like this…

“a shared understanding”

Page 73: BDD: The unit test of the product owner

Story

Working  code boring  

manual  tes*ng

BA

Developer

Tester

Many teams build features like this…

“a shared understanding”

Page 74: BDD: The unit test of the product owner

Story

bug  reports

Working  code boring  

manual  tes*ng

BA

Developer

Tester

Many teams build features like this…

“a shared understanding”

Page 75: BDD: The unit test of the product owner

Story

bug  reports

Working  code boring  

manual  tes*ng

WASTEBA

Developer

Tester

Many teams build features like this…

“a shared understanding”

Page 76: BDD: The unit test of the product owner

…but a little cooperation goes a long way…

Story

“a shared understanding”

Page 77: BDD: The unit test of the product owner

…but a little cooperation goes a long way…

Story

“a shared understanding”

Page 78: BDD: The unit test of the product owner

…but a little cooperation goes a long way…

Story

“a shared understanding”

Page 79: BDD: The unit test of the product owner

…but a little cooperation goes a long way…

Story

“a shared understanding”

Page 80: BDD: The unit test of the product owner

…but a little cooperation goes a long way…

StoryExamples

“a shared understanding”

Page 81: BDD: The unit test of the product owner

…but a little cooperation goes a long way…

StoryExamplesAutomated  acceptance  criteria

“a shared understanding”

Page 82: BDD: The unit test of the product owner

…but a little cooperation goes a long way…

Shared  understanding

StoryExamplesAutomated  acceptance  criteria

“a shared understanding”

Page 83: BDD: The unit test of the product owner

…but a little cooperation goes a long way…

Working  code    and    

Working  Automated  Acceptance  Tests

Shared  understanding

StoryExamplesAutomated  acceptance  criteria

“a shared understanding”

Page 84: BDD: The unit test of the product owner

…but a little cooperation goes a long way…

Working  code    and    

Working  Automated  Acceptance  Tests Exploratory  tes*ng,  

usability  tes*ng...

Shared  understanding

StoryExamplesAutomated  acceptance  criteria

“a shared understanding”

Page 85: BDD: The unit test of the product owner

We call this “The Three Amigos”

BA  and/or  product  owner

Tester Developer Automatable  Acceptance  Criteria

Shared  understanding

“a shared understanding”

Page 86: BDD: The unit test of the product owner

We call this “The Three Amigos”

“a shared understanding”

Page 87: BDD: The unit test of the product owner

We call this “The Three Amigos”

“a shared understanding”

Page 88: BDD: The unit test of the product owner

We call this “The Three Amigos”

“a shared understanding”

Page 89: BDD: The unit test of the product owner

We call this “The Three Amigos”

“a shared understanding”

Page 90: BDD: The unit test of the product owner

We call this “The Three Amigos”

“a shared understanding”

Page 91: BDD: The unit test of the product owner

“Automation without collaboration is empty”

Page 92: BDD: The unit test of the product owner

Living Documentation

Page 93: BDD: The unit test of the product owner

Living Documentation

Page 94: BDD: The unit test of the product owner

Living Documentation

Illustrates  delivered  features

Page 95: BDD: The unit test of the product owner

Living Documentation

A  star*ng  point  for  manual  tests

Illustrates  delivered  features

Page 96: BDD: The unit test of the product owner

Living Documentation

A  star*ng  point  for  manual  tests

Illustrates  delivered  features

Progress  repor*ng

Page 97: BDD: The unit test of the product owner

Living Documentation

A  star*ng  point  for  manual  tests

Illustrates  delivered  features

Func*onal  and  technical  documenta*on

Progress  repor*ng

Page 98: BDD: The unit test of the product owner

Automated test results tell us…

Page 99: BDD: The unit test of the product owner

Automated test results tell us…

How  many  tests  passed

Page 100: BDD: The unit test of the product owner

Automated test results tell us…

How  many  failed

How  many  tests  passed

Page 101: BDD: The unit test of the product owner

Automated test results tell us…

How  many  failed

How  many  tests  passed

How  many  weren’t  run

Page 102: BDD: The unit test of the product owner

Automated test results tell us…

Page 103: BDD: The unit test of the product owner

Automated test results tell us…

What  tests  exist  for  a  given  feature

Page 104: BDD: The unit test of the product owner

Automated test results tell us…

What  tests  exist  for  a  given  feature

How  stable  the  feature  is

Page 105: BDD: The unit test of the product owner

Automated test results tell us…

Page 106: BDD: The unit test of the product owner

Automated test results tell us…

How  a  feature  was  tested

Page 107: BDD: The unit test of the product owner

Automated test results tell us…

Page 108: BDD: The unit test of the product owner

Automated test results tell us…

What  a  feature  looks  like

Page 109: BDD: The unit test of the product owner

Automated test results tell us…

Page 110: BDD: The unit test of the product owner

Automated test results tell us…

What  a  feature  looks  like

Page 111: BDD: The unit test of the product owner

Automated test results tell us…

What  a  feature  looks  like

Page 112: BDD: The unit test of the product owner

Test results do not tell us what was not tested

Page 113: BDD: The unit test of the product owner

Feature Coverage

Page 114: BDD: The unit test of the product owner

Feature Coverage

What  stories  are  defined  for  this  feature?

Page 115: BDD: The unit test of the product owner

Feature Coverage

What  stories  are  defined  for  this  feature?

How  many  stories  have  automated  acceptance  criteria?

Page 116: BDD: The unit test of the product owner

Feature Coverage

What  stories  are  defined  for  this  feature?

How  many  stories  have  automated  acceptance  criteria?

What  acceptance  criteria  have  been  automated?

Page 117: BDD: The unit test of the product owner

“Living Documentation completes the circle”

Page 118: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

We  can  automate  these  examples  in  the  form  of  “executable  specifica;ons”

FeaturesFeaturesFeatures FeaturesFeaturesExamplesLow level

specificationsLow level specificationsLow level specifications

Executable specifications

“building the software right”

Page 119: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

We  can  automate  these  examples  in  the  form  of  “executable  specifica;ons”

FeaturesFeaturesFeatures FeaturesFeaturesExamplesLow level

specificationsLow level specificationsLow level specifications

Executable specifications

“building the software right”

Page 120: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

We  can  automate  these  examples  in  the  form  of  “executable  specifica;ons”

FeaturesFeaturesFeatures FeaturesFeaturesExamplesLow level

specificationsLow level specificationsLow level specifications

Executable specifications

“building the software right”

Page 121: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

We  use  low-­‐level  BDD  or  TDD  tools  to  define  the  behavior  of  components,  classes  etc.

FeaturesFeaturesFeatures FeaturesFeaturesExamplesLow level

specificationsLow level specificationsLow level specifications

Executable specifications

“building the software right”

Low level specifications

Low level specifications

Low level specifications

Low level specifications

Low level specifications

Page 122: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

We  use  low-­‐level  BDD  or  TDD  tools  to  define  the  behavior  of  components,  classes  etc.

FeaturesFeaturesFeatures FeaturesFeaturesExamplesLow level

specificationsLow level specificationsLow level specifications

Executable specifications

spockRSpec

“building the software right”

Low level specifications

Low level specifications

Low level specifications

Low level specifications

Low level specifications

Page 123: BDD: The unit test of the product owner

Business Goal

Business Goal

Business Goal

We  use  low-­‐level  BDD  or  TDD  tools  to  define  the  behavior  of  components,  classes  etc.

FeaturesFeaturesFeatures FeaturesFeaturesExamplesLow level

specificationsLow level specificationsLow level specifications

Executable specifications

spockRSpec

“building the software right”

Low level specifications

Low level specifications

Low level specifications

Low level specifications

Low level specifications

Page 124: BDD: The unit test of the product owner

“building the software right”

Page 125: BDD: The unit test of the product owner

Acceptance  criteria  tell  us  what  we  need  to  build…

“building the software right”

Page 126: BDD: The unit test of the product owner

“building the software right”

Page 127: BDD: The unit test of the product owner

What  would  we  like  the  API  to  look  like?

“building the software right”

Page 128: BDD: The unit test of the product owner

What  would  we  like  the  API  to  look  like?

“building the software right”

Page 129: BDD: The unit test of the product owner

What  would  we  like  the  API  to  look  like?

“building the software right”

Page 130: BDD: The unit test of the product owner

“building the software right”

Page 131: BDD: The unit test of the product owner

Then  write  low-­‐level  specifica;ons  for  the  code

“building the software right”

Page 132: BDD: The unit test of the product owner

Then  write  low-­‐level  specifica;ons  for  the  code

“building the software right”

Page 133: BDD: The unit test of the product owner

“building the software right”

Page 134: BDD: The unit test of the product owner

“building the software right”

These  low  level  specifica;ons  become  technical  documenta;on  for  your  APIs

Page 135: BDD: The unit test of the product owner

“Every class is an API for someone”

Page 136: BDD: The unit test of the product owner

BDD  requires  high  business  engagement  and  collabora;on  

Adoption challenges

Page 137: BDD: The unit test of the product owner

BDD  works  best  in  an  Agile  or  Itera;ve  context  

Adoption challenges

Page 138: BDD: The unit test of the product owner

BDD  does  not  work  well  in  a  silo  

Adoption challenges

Page 139: BDD: The unit test of the product owner

Adoption challenges

Skill  and  prac;ce  required:  •Wri;ng  good  scenarios  takes  prac;ce  •Poorly  wriNen  tests  can  lead  to  higher  test-­‐maintenance  costs  •Need  to  treat  test  automa;on  code  like  produc;on  code  

Page 140: BDD: The unit test of the product owner

BDD Gotchas

12

3

4

Page 141: BDD: The unit test of the product owner

BDD Gotchas

12

3

4An;-­‐paNern  1  The  business  analyst  writes  the  scenarios  and  then  gives  them  to  the  other  team  members.

Page 142: BDD: The unit test of the product owner

12

3

4

BDD Gotchas

Page 143: BDD: The unit test of the product owner

12

3

4

BDD Gotchas

An;-­‐paNern  2  The  tester  writes  the  scenarios  at  the  end  to  implement  an  automated  test  suite.

Page 144: BDD: The unit test of the product owner

1

2

3

45

BDD Gotchas

Page 145: BDD: The unit test of the product owner

1

2

3

45

BDD Gotchas

An;-­‐paNern  3  The  “Three  Amigos”  sessions  don’t  result  in  usable  scenarios,  so  the  developer  invents  them  a?erwards.

Page 146: BDD: The unit test of the product owner

1

2

3

45

BDD Gotchas

An;-­‐paNern  3  The  “Three  Amigos”  sessions  don’t  result  in  usable  scenarios,  so  the  developer  invents  them  a?erwards.

Page 147: BDD: The unit test of the product owner

1

2

3

45

BDD Gotchas

Page 148: BDD: The unit test of the product owner

1

2

3

45

BDD Gotchas

An;-­‐paNern  4  The  scenarios  are  too  UI-­‐centric  or  detail-­‐focused,  and  neglect  to  express  the  core  business  value.

Page 149: BDD: The unit test of the product owner

In conclusion…

It’s  behaviour  all  the  way  down

Page 150: BDD: The unit test of the product owner

Want to learn more?

Page 151: BDD: The unit test of the product owner

Want to learn more?

Page 152: BDD: The unit test of the product owner

Want to learn more?

http://jbehave.org/

Page 153: BDD: The unit test of the product owner

Want to learn more?

http://thucydides.info/

http://jbehave.org/

Page 154: BDD: The unit test of the product owner

Want to learn more?

http://thucydides.info/

https://code.google.com/p/spock/

http://jbehave.org/

Page 155: BDD: The unit test of the product owner

Want to learn more?

http://www.wakaleo.com

Page 156: BDD: The unit test of the product owner

Want to learn more?

Discount  code:  MEETUP2014

http://www.wakaleo.com

Page 157: BDD: The unit test of the product owner

Thank You

John Ferguson Smart

[email protected]

wakaleo

http://www.wakaleo.com