its testing-jim-but-not-as-we-know-it-devoxx

153
@YourTwitterHandle #YourSessionHashtag It’s testing, Jim, but not as we know it John Ferguson Smart @wakaleo https://java.net/blogs/johnsmart http://www.wakaleo.com

Upload: wakaleo-consulting

Post on 13-Jul-2015

2.242 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Its testing-jim-but-not-as-we-know-it-devoxx

@YourTwitterHandle#YourSessionHashtag

It’s testing, Jim, but not as we know it

John Ferguson Smart @wakaleo https://java.net/blogs/johnsmart http://www.wakaleo.com

Page 2: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

It’s testing, Jim, but not as we know it

John Ferguson Smart

Consultant  Trainer  Mentor  Author  Speaker  Coder

Page 3: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

It’s testing, Jim, but not as we know it

John Ferguson Smart

Consultant  Trainer  Mentor  Author  Speaker  Coder

Page 4: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

It’s testing, Jim, but not as we know it

John Ferguson Smart

Consultant  Trainer  Mentor  Author  Speaker  Coder

Page 5: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

It’s testing, Jim, but not as we know it

John Ferguson Smart

Consultant  Trainer  Mentor  Author  Speaker  Coder

Page 6: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

Page 7: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

Using examples

Page 8: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

Using examples a shared understanding

Page 9: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

Using examples a shared understanding

surface uncertainty

Page 10: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

Using examples a shared understanding

surface uncertainty software that matters

Page 11: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

BDD

Page 12: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

BDDCollaboration

Page 13: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

BDD

Hunting out value

Collaboration

Page 14: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

BDD

Hunting out value

Collaboration

Building the right software

Page 15: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

BDD

Hunting out value Automated Acceptance Criteria

Collaboration

Building the right software

Page 16: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

BDD

Hunting out value Automated Acceptance Criteria

API and code design

Collaboration

Building the right software

Page 17: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

BDD

Hunting out value Automated Acceptance Criteria

API and code design

Collaboration

Building the software right

Building the right software

Page 18: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Behaviour Driven Development

BDD

Hunting out value Automated Acceptance Criteria

API and code design

Collaboration

Building the software right

Building the right software

Living Documentation

Page 19: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 20: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 21: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 22: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 23: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 24: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 25: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 26: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 27: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 28: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 29: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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

documentationA traditional development process

BDD in a nutshell

Page 30: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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"

A BDD development process

Page 31: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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"

A BDD development process

Page 32: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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"

A BDD development process

Page 33: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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"

A BDD development process

Page 34: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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"

A BDD development process

Page 35: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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"

A BDD development process

Page 36: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

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"

A BDD development process

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

Page 37: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Building the thing right

Building the right thing

Wha

t

How

Mis

alig

ned

requ

irem

ents

Poor craftsmanship

Page 38: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building 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 39: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building 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 40: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building 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 41: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building 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 42: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building 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 43: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building 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 44: Its testing-jim-but-not-as-we-know-it-devoxx

“Show  me  the  money”

Page 45: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Business Goal

Business Goal

Business Goal

We  start  with  a  business  goal

Page 46: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Business Goal

Business Goal

Business Goal

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 47: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Business Goal

Business Goal

Business Goal

What  features  will  enable  us  to  deliver  this  goal?

FeaturesFeaturesFeatures

Page 48: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Business Goal

Business Goal

Business Goal

What  features  will  enable  us  to  deliver  this  goal?

FeaturesFeaturesFeatures

Earn  Frequent  Flyer  points  from  flights

Page 49: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Business Goal

Business Goal

Business Goal

What  features  will  enable  us  to  deliver  this  goal?

FeaturesFeaturesFeatures

Earn  Frequent  Flyer  points  from  flights

Earn  Frequent  Flyer  points  from  purchases

Page 50: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Business Goal

Business Goal

Business Goal

What  features  will  enable  us  to  deliver  this  goal?

FeaturesFeaturesFeatures

Earn  Frequent  Flyer  points  from  flights

Earn  Frequent  Flyer  points  from  purchases

View  Frequent  Flyer  account  balance  online

Page 51: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Business Goal

Business Goal

Business Goal FeaturesFeaturesFeatures

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

FeaturesFeaturesExamples

Page 52: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Business Goal

Business Goal

Business Goal FeaturesFeaturesFeatures

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

FeaturesFeaturesExamples

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

Page 53: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Building software that matters

Business Goal

Business Goal

Business Goal FeaturesFeaturesFeatures

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

FeaturesFeaturesExamples

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

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

Page 54: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Increase ticket sales revenue by 5%

Frequent Flyer members

Call centre staff

Buy more tickets

Encourage friends to join

Spend less time on phone sales

Purchase flights with redeemed miles

Purchase other goods with redeemed miles

Facebook and Twitter integration

Online sales

Why Who How What

Building software that matters

Techniques  like  Impact  Mapping  can  help  us  discuss  what  features  are  worth  building

Page 55: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - you don’t know what you don’t knowUnderstanding of what needs to be

delivered

Time

Page 56: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - you don’t know what you don’t knowUnderstanding of what needs to be

delivered

Time

Requirementsphase done

AnalysisPhase done

Page 57: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - you don’t know what you don’t knowUnderstanding of what needs to be

delivered

Time

Requirementsphase done

AnalysisPhase done

Page 58: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - 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 59: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

Page 60: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

“Having  the  conversa/on    is  more  important  than    

recording  the  conversa/on  is  more  important  than    

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

Page 61: Its testing-jim-but-not-as-we-know-it-devoxx

Building  a  shared  understanding

The  essence  of  BDD

Page 62: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

Story

bug  reports

Working  code boring  

manual  tes*ng

WASTEBA

Developer

TesterMany  teams  build  features  like  this

Page 63: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

A  liKle  collabora8on  goes  a  long  way

Story

Page 64: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

A  liKle  collabora8on  goes  a  long  way

Story

Page 65: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

A  liKle  collabora8on  goes  a  long  way

Story

Page 66: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

A  liKle  collabora8on  goes  a  long  way

Story

Page 67: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

A  liKle  collabora8on  goes  a  long  way

StoryExamples

Page 68: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

A  liKle  collabora8on  goes  a  long  way

StoryExamplesAutomated  acceptance  criteria

Page 69: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

A  liKle  collabora8on  goes  a  long  way

Shared  understanding

StoryExamplesAutomated  acceptance  criteria

Page 70: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

A  liKle  collabora8on  goes  a  long  way

Working  code    and    

Working  Automated  Acceptance  Tests

Shared  understanding

StoryExamplesAutomated  acceptance  criteria

Page 71: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

A  liKle  collabora8on  goes  a  long  way

Working  code    and    

Working  Automated  Acceptance  Tests

Exploratory  tes*ng,  usability  tes*ng...

Shared  understanding

StoryExamplesAutomated  acceptance  criteria

Page 72: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understandingBA  and/or  product  owner

Tester Developer Automatable  Acceptance  Criteria

Shared  understanding

Page 73: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understandingBA  and/or  product  owner

Tester Developer Automatable  Acceptance  Criteria

Shared  understanding

“The  Three  Amigos”

Page 74: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

Page 75: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

“The  Three  Amigos”

Page 76: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

“The  Three  Amigos”

Page 77: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

“The  Three  Amigos”

Page 78: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

“The  Three  Amigos”

Page 79: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD - building a shared understanding

“The  Three  Amigos”

Page 80: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Discovering requirements through examples

Page 81: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Discovering requirements through examples

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

Page 82: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Discovering requirements through examples

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

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

Page 83: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Discovering requirements through 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  ”

Page 84: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Discovering requirements through 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 85: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Discovering requirements through examples

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

Page 86: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Discovering requirements through examples

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

Page 87: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Discovering requirements through examples

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

Page 88: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Discovering requirements through examples

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

Page 89: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Automated acceptance criteria

“It is fun to have fun But you have to know how”

*Dr Seuss, “The Cat in the Hat”

*

Page 90: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Automated acceptance criteria

Page 91: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Automated acceptance criteria

Page 92: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Business  Rules

Business  Flow

Page/Component  interac*ons

Page/Component/Service  API

Write testing APIs, not test scripts

Page 93: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Business  Rules

Business  Flow

Page/Component  interac*ons

Page/Component/Service  API

Write testing APIs, not test scripts

Page 94: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Business  Rules

Business  Flow

Page/Component  interac*ons

Page/Component/Service  API

Write testing APIs, not test scripts

Page 95: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Business  Rules

Business  Flow

Page/Component  interac*ons

Page/Component/Service  API

Write testing APIs, not test scripts

Page 96: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Business  Rules

Business  Flow

Page/Component  interac*ons

Page/Component/Service  API

Write testing APIs, not test scripts

Page 97: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Work together!

Page 98: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Work together!

•Discuss  tes8ng  strategies  in  the  “Three  Amigos”  sessions  •Factor  testability  into  the  design  •Developers  and  testers  pair  to  implement  the  automated  tests  

Page 99: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Focus on business value

Page 100: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Focus on business value

Page 101: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Focus on business value

Page 102: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Page 103: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Page 104: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Illustrates  delivered  features

Page 105: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

A  star*ng  point  for  manual  tests

Illustrates  delivered  features

Page 106: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

A  star*ng  point  for  manual  tests

Illustrates  delivered  features

Progress  repor*ng

Page 107: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

A  star*ng  point  for  manual  tests

Illustrates  delivered  features

Func*onal  and  technical  documenta*on

Progress  repor*ng

Page 108: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Living  documenta8on  gives  an  up-­‐to-­‐date  overview  of  the  project  status

Page 109: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

Page 110: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

How  many  tests  passed

Page 111: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

How  many  failed

How  many  tests  passed

Page 112: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

How  many  failed

How  many  tests  passed

How  many  weren’t  run

Page 113: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

Page 114: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

What  tests  exist  for  a  given  feature

Page 115: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

What  tests  exist  for  a  given  feature

How  stable  the  feature  is

Page 116: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

Page 117: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

How  a  feature  was  tested

Page 118: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

Page 119: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

What  a  feature  looks  like

Page 120: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

What  a  feature  looks  like

Page 121: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test  reports  tell  us…

What  a  feature  looks  like

Page 122: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - DIY!

Page 123: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - DIY!

It’s  the  approach,  not  the  tool

Page 124: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - DIY!

It’s  the  approach,  not  the  tool

Page 125: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Test results do not tell us what was not tested

Page 126: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

Page 127: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

What  do  we  plan  to  deliver?

Page 128: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

What  do  we  plan  to  deliver?

What  has  been  done?

Page 129: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

What  do  we  plan  to  deliver?

What  has  been  done? What  is  in  progress

Page 130: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

What  do  we  plan  to  deliver?

What  has  been  done? What  is  in  progress

What  hasn’t  been  started  yet

Page 131: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

What  do  we  plan  to  deliver?

What  has  been  done? What  is  in  progress

What  hasn’t  been  started  yet

How  many  automated  and  manual  tests  were  performed

Page 132: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

Page 133: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

What  stories  are  defined  for  this  

feature?

Page 134: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

What  stories  are  defined  for  this  

feature?

How  many  stories  have  automated  acceptance  criteria?

Page 135: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Living Documentation - completing the cycle

Feature  Coverage  tells  us…

What  stories  are  defined  for  this  

feature?

How  many  stories  have  automated  acceptance  criteria?

What  acceptance  criteria  have  been  

automated?

Page 136: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD gotchas

12

3

4

Page 137: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD gotchas

12

3

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

Page 138: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD gotchas

12

3

4

Page 139: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD gotchas

12

3

4

An8-­‐paKern  2  The  tester  writes  the  scenarios  at  the  end  to  implement  an  automated  test  suite.

Page 140: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD gotchas

1

2

3

45

Page 141: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD gotchas

1

2

3

45

Page 142: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD gotchas

1

2

3

45

An8-­‐paKern  3  The  “Three  Amigos”  sessions  don’t  result  in  usable  scenarios,  so  the  developer  invents  them  aAerwards.

Page 143: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD gotchas

1

2

3

45

Page 144: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD gotchas

1

2

3

45

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

Page 145: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD benefits

Page 146: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD benefits

•Focus  effort  •Reduce  waste  and  misaligned  requirements

Page 147: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD benefits

Deliver  more  valuable  soXware

Page 148: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD benefits

Make  changes  safely

Page 149: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD benefits

Faster  and  more  reliable  releases

Page 150: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

BDD benefits

Reduced  maintenance  costs

Page 151: Its testing-jim-but-not-as-we-know-it-devoxx

@YourTwitterHandle#DVXFR14{session hashtag} @YourTwitterHandle#YourSessionHashtag

Q & A

Page 152: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Want to learn more?

http://thucydides.info/

Page 153: Its testing-jim-but-not-as-we-know-it-devoxx

@wakaleo#bddinactionuk

Want to learn more?

http://thucydides.info/