Top Banner
BDD It’s not just ‘given-when-then’
35
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: BDD: There's more to it than you think

BDD

It’s not just ‘given-when-then’

Page 2: BDD: There's more to it than you think

John Ferguson Smart

Consultant  Trainer  Mentor  Author  Speaker  Coder

Page 3: BDD: There's more to it than you think

So what is this BDD thing?Scenario:  Learning  About  Qantas     Given  I  am  on  the  Wikipedia  home  page     When  I  search  for  'Qantas'  in  'English'     Then  I  should  see  the  'Qantas'  wikipedia  entry

A  Test  Automa6on  Tool?

Page 4: BDD: There's more to it than you think

So what is this BDD thing?Scenario:  Learning  About  Qantas     Given  I  am  on  the  Wikipedia  home  page     When  I  search  for  'Qantas'  in  'English'     Then  I  should  see  the  'Qantas'  wikipedia  entry

A  way  to  write  acceptance  criteria?

Page 5: BDD: There's more to it than you think

So what is this BDD thing?Scenario:  Learning  About  Qantas     Given  I  am  on  the  Wikipedia  home  page     When  I  search  for  'Qantas'  in  'English'     Then  I  should  see  the  'Qantas'  wikipedia  entry

A  way  to  define  requirements?

Page 6: BDD: There's more to it than you think

BDD

Feature InjectionAutomated Acceptance

Criteria

API and code design

Collaboration

Building the software right

Building the right software

Living Documentation

Page 7: BDD: There's more to it than you think

“Having  the  conversa/on    is  more  important  than    

recording  the  conversa/on  is  more  important  than    

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

BDD  starts  with  conversa6on

Page 8: BDD: There's more to it than you think

Feature  Injec6on

Hunt  the  value!

Page 9: BDD: There's more to it than you think

Why do we build any feature?

Increase  Revenue

Protect  Revenue

Reduce  Costs

Avoid  Future  Costs

Page 10: BDD: There's more to it than you think

Examples/Scenarios

Stories

Features

Capabilities

Goals

Acceptance Criteria

Where do features come from?

Page 11: BDD: There's more to it than you think

Features guide the development process

Page 12: BDD: There's more to it than you think

But knowing why we build a feature is even better

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

Page 13: BDD: There's more to it than you think

Story

bug  reports

Working  code boring  

manual  tes:ng

WASTEBA

Developer

Tester

Many teams build features like this…

Collabora6on

Page 14: BDD: There's more to it than you think

…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

Collabora6on

Page 15: BDD: There's more to it than you think

We call this “The Three Amigos”

BA  and/or  product  owner

Tester Developer Automatable  Acceptance  Criteria

Shared  understanding

Collabora6on

Page 16: BDD: There's more to it than you think

Collabora6on

We call this “The Three Amigos”

Page 17: BDD: There's more to it than you think

“Automation without collaboration is empty”

Page 18: BDD: There's more to it than you think

Scenario

Step  Defini6ons

Low  level  specifica6ons  (aka  “unit  tests”)

Applica6on  Code

API  and  Code  Design

Page 19: BDD: There's more to it than you think

Oh, the things you can learn…

API  and  Code  Design

Page 20: BDD: There's more to it than you think

What  would  we  like  the  API  to  look  like?

API  and  Code  Design

Page 21: BDD: There's more to it than you think

Then  write  low-­‐level  specifica6ons  for  the  code

API  and  Code  Design

Page 22: BDD: There's more to it than you think

Then  write  low-­‐level  specifica6ons  for  the  code

API  and  Code  Design

Page 23: BDD: There's more to it than you think

“Every class is an API for someone”

Page 24: BDD: There's more to it than you think

Living  Documenta6on

Page 25: BDD: There's more to it than you think

Living  Documenta6on

A  star:ng  point  for  manual  tests

Illustrates  delivered  features

Func:onal  and  technical  documenta:on

Progress  repor:ng

Page 26: BDD: There's more to it than you think

Living  Documenta6on

Scenario: Searching by keyword Given Sally wants to buy a puppy for her son When she looks for ads in the Pets & Animals category containing puppy Then she should obtain a list of ads for puppies for sale

Page 27: BDD: There's more to it than you think

Living  Documenta6on

Page 28: BDD: There's more to it than you think

Living  Documenta6on

High level requirements (capabilities)

Page 29: BDD: There's more to it than you think

Living  Documenta6on

A capability

Features that support this capability

Page 30: BDD: There's more to it than you think

Living  Documenta6on

Details for a feature

Stories for this feature

Page 31: BDD: There's more to it than you think

Living  Documenta6on

Pending story

Acceptance criteria for this story

Page 32: BDD: There's more to it than you think

Living  Documenta6on

Acceptance criteria

Acceptance criteria details

Page 33: BDD: There's more to it than you think

“Living Documentation completes the circle”

Page 34: BDD: There's more to it than you think

In conclusion…

It’s  behaviour  all  the  way  down

Page 35: BDD: There's more to it than you think

Thank You

John Ferguson Smart

[email protected]

wakaleo

http://www.wakaleo.com