+ All Categories
Home > Technology > Using BDD as a communication tool between the business and technology

Using BDD as a communication tool between the business and technology

Date post: 23-Jan-2018
Category:
Upload: seb-rose
View: 211 times
Download: 0 times
Share this document with a friend
94
Transcript

@letitia_fearon @sebrose

Using BDD as a communication tool

between the business and technology

Letitia Fearon BA Team Manager Lloyd’s of London

Seb Rose Director Cucumber Limited

@letitia_fearon @sebrose www.projectcartoon.com

@letitia_fearon @sebrose

What behaviour does the customer actually want?

@letitia_fearon @sebrose

What do successful projects look like?

@letitia_fearon @sebrose

What do successful projects look like?

Shared understanding

@letitia_fearon @sebrose

What do successful projects look like?

Shared understanding

Detect broken

behaviour

quickly

@letitia_fearon @sebrose

What do successful projects look like?

Shared understanding

The codebase supports change

Detect broken

behaviour

quickly

@letitia_fearon @sebrose

What do successful projects look like?

Shared understanding

Know what to do next

The codebase supports change

Detect broken

behaviour

quickly

@letitia_fearon @sebrose

What do successful projects look like?

Shared understanding

Know when you’re done Know what to do next

The codebase supports change

Detect broken

behaviour

quickly

@letitia_fearon @sebrose

Behaviour Driven Development“An approach that enhances the

communica1on between stakeholders and project team

members by expressing product needs as concrete examples.”

Agile Extension to IIBA BABOK ®

@letitia_fearon @sebrose

“BDD prac11oners explore, discover, define and then drive-

out the desired behaviour of soIware using conversa1ons,

concrete examples and automated tests”

MaK Wynne

@letitia_fearon @sebrose

Where does the fit in?BA

BDD approach

Pick a user story

BDD approach

Pick a user story

3 Amigos

BDD approach

Pick a user story

Formulate

3 Amigos

BDD approach

Pick a user story

Formulate

3 Amigos

Review

BDD approach

Pick a user story

Formulate

3 Amigos

Review

Development

BDD approach

Pick a user story

Automate

Formulate

3 Amigos

Review

Development

BDD approach

Pick a user story

Automate

Formulate

3 Amigos

Review

Implement

Development

BDD approach

Pick a user story

Automate

Formulate

3 Amigos

Review

Implement

Development

BDD approach

@letitia_fearon @sebrose

Conversations

@letitia_fearon @sebrose

Conversations

Give me an example.Have

you thought about …

Is there something else that needs to

happen?

Is that always true?

What would happen

if … ?

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Story

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Story

Rule Rule

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Story

Rule Rule

Example

Example Example

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Story

Rule Rule

Example

Example ExampleExample

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Story

Rule Rule

Example

Example ExampleExample

Question

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Example

Story

Rule Rule

Example Example

Example ExampleExample

Question

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Rule

Example

Story

Rule Rule

Example Example

Example ExampleExample

Question

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Rule

Example

Story

Rule Rule

Example Example

Example ExampleExample

Question

Question

Question

Question

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Rule

Example

Story

Rule Rule

Example Example

Example ExampleExample

@letitia_fearon @sebrose

Structured conversations with Example Mapping

https://cucumber.io/blog/2015/12/08/example-mapping-introduction

Rule

Story

Rule RuleRule

Rule RuleRule

RuleRule

@letitia_fearon @sebrose

Elicitation using rules and examples

Story - Display library opening times

@letitia_fearon @sebrose

Elicitation using rules and examples

Story - Display library opening times

Rules - Library opening hours are

Monday to Friday, 9:00 to 17:00

@letitia_fearon @sebrose

Elicitation using rules and examples

Examples - The library is open on

Monday 29/5/17 at 10:00

Rules - Library opening hours are

Monday to Friday, 9:00 to 17:00

@letitia_fearon @sebrose

Elicitation using rules and examples

Examples - The library is open on

Monday 29/5/17 at 10:00(a UK Bank Holiday)

Rules - Library opening hours are

Monday to Friday, 9:00 to 17:00

@letitia_fearon @sebrose

ExamplesRules

The relationship between

and

@letitia_fearon @sebrose

Examples

Rules

illustrate

@letitia_fearon @sebrose

Examples

Rules

Tests

can become

illustrate

@letitia_fearon @sebrose

Examples

Rules

Tests

can become

verify

illustrate

@letitia_fearon @sebrose

ExamplesRules

The difference between

@letitia_fearon @sebrose

ExamplesRules

The difference between

Abstract Concrete

@letitia_fearon @sebrose

ExamplesRules

The difference between

Concise

Abstract Concrete

Precise

@letitia_fearon @sebrose

ExamplesRules

The difference between

Concise

Abstract

Close a conversation Start a conversation

Concrete

Precise

@letitia_fearon @sebrose

ExamplesRules

The difference between

Concise

Abstract

Close a conversation Start a conversation

Concrete

Precise

Closer to solution Closer to problem

@letitia_fearon @sebrose

Anatomy of an example

OUTCOME

@letitia_fearon @sebrose

Anatomy of an example

ACTION OUTCOME

@letitia_fearon @sebrose

Anatomy of an example

CONTEXT ACTION OUTCOME

@letitia_fearon @sebrose

Examples describe system behaviour

Behaviour = Context + Action + Outcome

@letitia_fearon @sebrose

Examples describe system behaviour

Behaviour = Context + Action + Outcome

System = Σ(Behaviour)

@letitia_fearon @sebrose

Good examples should be:• Interesting

• Declarative

• Ubiquitous

• Concrete

• Essential

• Focused

@letitia_fearon @sebrose

Good examples should be:• Interesting

• Declarative

• Ubiquitous

• Concrete

• Essential

• Focused

➡ Every example has reason for existing

@letitia_fearon @sebrose

Good examples should be:• Interesting

• Declarative

• Ubiquitous

• Concrete

• Essential

• Focused

➡ Every example has reason for existing

➡ What, not how

@letitia_fearon @sebrose

Good examples should be:• Interesting

• Declarative

• Ubiquitous

• Concrete

• Essential

• Focused

➡ Every example has reason for existing

➡ What, not how

➡ Written in business terminology

@letitia_fearon @sebrose

Good examples should be:• Interesting

• Declarative

• Ubiquitous

• Concrete

• Essential

• Focused

➡ Every example has reason for existing

➡ What, not how

➡ Written in business terminology

➡ Using actual data values …

@letitia_fearon @sebrose

Good examples should be:• Interesting

• Declarative

• Ubiquitous

• Concrete

• Essential

• Focused

➡ Every example has reason for existing

➡ What, not how

➡ Written in business terminology

➡ Using actual data values …

➡ … that contribute to understanding

@letitia_fearon @sebrose

Good examples should be:• Interesting

• Declarative

• Ubiquitous

• Concrete

• Essential

• Focused

➡ Every example has reason for existing

➡ What, not how

➡ Written in business terminology

➡ Using actual data values …

➡ … that contribute to understanding

➡ Illustrate only a single rule

@letitia_fearon @sebrose

Library requirementAt the library, it’s free to take out books that are on the shelves, but there is a charge if you want to reserve an item that’s currently on loan.The charges are: • Adult membership - £1.00 per item • Child membership

• Free for up to 6 children’s books • 50p per item for all others

@letitia_fearon @sebrose

Sample example

map

Apply reservation charges to library members

Adults pay a reservation charge of £1 per item

C. Andrew is an adult member A. Andrew reserves a book O. The charge is £1

What should we charge someone that reserves an

item that is already in stock?

Children do not pay a reservation charge for the first 6 children’s books they reserve. There is a charge of 50p for other items.

C. Caroline is a child member A. Caroline reserves a children’s book O. There is no charge

C. Andrew is an adult member A. Andrew reserves a children’s book O. The charge is £1

C. Andrew is an adult member A. Andrew reserves 5 books O. The charge is £5

C. Caroline is a child member A. Caroline reserves 6 children’s books O. There is no charge

C. Caroline is a child member A. Caroline reserves 7 children’s books O. The charge is 50p

C. Caroline is a child member A. Caroline reserves an adult book O. The charge is 50p

How many items can a member reserve?

@letitia_fearon @sebrose

Sample example

map

Apply reservation charges to library members

Adults pay a reservation charge of £1 per item

C. Andrew is an adult member A. Andrew reserves a book O. The charge is £1

Children do not pay a reservation charge for the first 6 children’s books they reserve. There is a charge of 50p for other items.

C. Caroline is a child member A. Caroline reserves a children’s book O. There is no charge

@letitia_fearon @sebrose

Sample example

map Apply reservation charges to library members

Adults pay a reservation charge of £1 per item

C. Andrew is an adult member A. Andrew reserves a book O. The charge is £1

Children do not pay a reservation charge for the first 6 children’s books they reserve. There is a charge of 50p for other items.

C. Caroline is a child member A. Caroline reserves a children’s book O. There is no charge

C. Andrew is an adult member A. Andrew reserves a children’s book

C. Caroline is a child member A. Caroline reserves 6 children’s books

@letitia_fearon @sebrose

Sample example

map

Adults pay a reservation charge of £1 per item

C. Andrew is an adult member A. Andrew reserves a book O. The charge is £1

What should we charge someone that reserves an

item that is already in stock?

Children do not pay a reservation charge for the first 6 children’s books they reserve. There is a charge of 50p for other items.

C. Caroline is a child member A. Caroline reserves a children’s book O. There is no charge

C. Andrew is an adult member A. Andrew reserves a children’s book O. The charge is £1

C. Andrew is an adult member A. Andrew reserves 5 books O. The charge is £5

C. Caroline is a child member A. Caroline reserves 6 children’s books O. There is no charge

C. Caroline is a child member A. Caroline reserves 7 children’s books O. The charge is 50p

How many items can a

@letitia_fearon @sebrose

Sample example

mapApply reservation charges to library members

Adults pay a reservation charge of £1 per item

C. Andrew is an adult member A. Andrew reserves a book O. The charge is £1

Children do not pay a reservation charge for the first 6 children’s books they reserve. There is a charge of 50p for other items.

C. Caroline is a child member A. Caroline reserves a children’s book O. There is no charge

C. Andrew is an adult member A. Andrew reserves a children’s

C. Caroline is a child member A. Caroline reserves 6 children’s books

@letitia_fearon @sebrose

Sample example

map

Adults pay a reservation charge of £1 per item

C. Andrew is an adult member A. Andrew reserves a book O. The charge is £1

Children do not pay a reservation charge for the first 6 children’s books they reserve. There is a charge of 50p for other items.

C. Caroline is a child member A. Caroline reserves a children’s book O. There is no charge

C. Andrew is an adult member A. Andrew reserves a children’s book O. The charge is £1

C. Andrew is an adult member A. Andrew reserves 5 books O. The charge is £5

C. Caroline is a child member A. Caroline reserves 6 children’s books O. There is no charge

C. Caroline is a child member A. Caroline reserves 7 children’s books O. The charge is 50p

@letitia_fearon @sebrose

Sample example

map

C. Andrew is an adult member A. Andrew reserves a children’s book O. The charge is £1

C. Andrew is an adult member A. Andrew reserves 5 books O. The charge is £5

C. Caroline is a child member A. Caroline reserves 6 children’s books O. There is no charge

C. Caroline is a child member A. Caroline reserves 7 children’s books O. The charge is 50p

C. Caroline is a child member A. Caroline reserves an adult book O. The charge is 50p

@letitia_fearon @sebrose

Sample example

map

A. Andrew reserves a book O. The charge is £1

What should we charge someone that reserves an

item that is already in stock?

C. Andrew is an adult member A. Andrew reserves a children’s book O. The charge is £1

C. Andrew is an adult member A. Andrew reserves 5 books O. The charge is £5

How many items can a member reserve?

@letitia_fearon @sebrose

Sample example

map

Apply reservation charges to library members

Adults pay a reservation charge of £1 per item

C. Andrew is an adult member A. Andrew reserves a book O. The charge is £1

What should we charge someone that reserves an

item that is already in stock?

Children do not pay a reservation charge for the first 6 children’s books they reserve. There is a charge of 50p for other items.

C. Caroline is a child member A. Caroline reserves a children’s book O. There is no charge

C. Andrew is an adult member A. Andrew reserves a children’s book O. The charge is £1

C. Andrew is an adult member A. Andrew reserves 5 books O. The charge is £5

C. Caroline is a child member A. Caroline reserves 6 children’s books O. There is no charge

C. Caroline is a child member A. Caroline reserves 7 children’s books O. The charge is 50p

C. Caroline is a child member A. Caroline reserves an adult book O. The charge is 50p

How many items can a member reserve?

@letitia_fearon @sebrose

Formulation

@letitia_fearon @sebrose

FormulationC: Andrew is an adult member

@letitia_fearon @sebrose

Formulation

Given that Andrew has adult membership

C: Andrew is an adult member

@letitia_fearon @sebrose

Formulation

Given that Andrew has adult membership

C: Andrew is an adult member C: Andrew is an adult member

A: Andrew reserves a book

@letitia_fearon @sebrose

Formulation

Given that Andrew has adult membership

C: Andrew is an adult member C: Andrew is an adult member

A: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book

@letitia_fearon @sebrose

Formulation

Given that Andrew has adult membership

C: Andrew is an adult member C: Andrew is an adult member

A: Andrew reserves a book

C: Andrew is an adult member

A: Andrew reserves a book

O: The charge is £1

Given that Andrew has adult membership When he reserves 1 book

@letitia_fearon @sebrose

Formulation

Given that Andrew has adult membership

C: Andrew is an adult member C: Andrew is an adult member

A: Andrew reserves a book

C: Andrew is an adult member

A: Andrew reserves a book

O: The charge is £1

Given that Andrew has adult membership When he reserves 1 book Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

@letitia_fearon @sebrose

AutomationScenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

@letitia_fearon @sebrose

AutomationScenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

Scenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

Scenario: Andrew reserves a children’s book

Given that Andrew has adult membership When he reserves 1 children’s book Then he should be charged £1

@letitia_fearon @sebrose

AutomationScenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

Scenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

Scenario: Andrew reserves a children’s book

Given that Andrew has adult membership When he reserves 1 children’s book Then he should be charged £1

Scenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

Scenario: Andrew reserves a children’s book

Given that Andrew has adult membership When he reserves 1 children’s book Then he should be charged £1

@letitia_fearon @sebrose

AutomationScenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

Scenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

Scenario: Andrew reserves a children’s book

Given that Andrew has adult membership When he reserves 1 children’s book Then he should be charged £1

Scenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

Scenario: Andrew reserves a children’s book

Given that Andrew has adult membership When he reserves 1 children’s book Then he should be charged £1

Scenario: Andrew reserves a book

Given that Andrew has adult membership When he reserves 1 book Then he should be charged £1

Scenario: Andrew reserves a children’s book

Given that Andrew has adult membership When he reserves 1 children’s book Then he should be charged £1 Expected ‘1.00’, but received ‘0.00’

@letitia_fearon @sebrose

Case study

• More than $4.4 trillion managed assets • Over 2,500 IT staff in 200+ agile teams

• Shift-Left initiative running for 2 years • “More of a mindset shift” • https://www.youtube.com/watch?v=XAjkc28nUjY

@letitia_fearon @sebrose

Case study

Reported results: • Shorter testing cycle • Reduced defect count • Reduced time to market • Increased team confidence and reduced

levels of anxiety • Reduced manual testing costs

@letitia_fearon @sebrose

Roadshow Get more people on board

Training Brown Bag and Forums Open Space Conference

Shift Left Pyramid

Manual vs Automation

Process Changes Team Norms

Automation Engineer Product Test Engineer

Case study

So, what is BDD?Behaviour Driven Development consists of three core practices:

So, what is BDD?Behaviour Driven Development consists of three core practices:

Discovery Create a shared understanding of the requirements through

collaboration, typically achieved through a structured conversation centred on rules and examples

So, what is BDD?Behaviour Driven Development consists of three core practices:

Discovery Create a shared understanding of the requirements through

collaboration, typically achieved through a structured conversation centred on rules and examples

Formulation Examples of system behaviour are documented using

business terminology

So, what is BDD?Behaviour Driven Development consists of three core practices:

Discovery Create a shared understanding of the requirements through

collaboration, typically achieved through a structured conversation centred on rules and examples

Formulation Examples of system behaviour are documented using

business terminology

Automation The documentation is automated, creating living

documentation that verifies the system’s behaviour

So, what is BDD?Behaviour Driven Development consists of three core practices:

Discovery Create a shared understanding of the requirements through

collaboration, typically achieved through a structured conversation centred on rules and examples

Formulation Examples of system behaviour are documented using

business terminology

Automation The documentation is automated, creating living

documentation that verifies the system’s behaviour

So, what is BDD?Behaviour Driven Development consists of three core practices:

Discovery Create a shared understanding of the requirements through

collaboration, typically achieved through a structured conversation centred on rules and examples

Formulation Examples of system behaviour are documented using

business terminology

Automation The documentation is automated, creating living

documentation that verifies the system’s behaviour

BA led

So, what is BDD?Behaviour Driven Development consists of three core practices:

Discovery Create a shared understanding of the requirements through

collaboration, typically achieved through a structured conversation centred on rules and examples

Formulation Examples of system behaviour are documented using

business terminology

Automation The documentation is automated, creating living

documentation that verifies the system’s behaviour

BA led

BA reviewed

So, what is BDD?Behaviour Driven Development consists of three core practices:

Discovery Create a shared understanding of the requirements through

collaboration, typically achieved through a structured conversation centred on rules and examples

Formulation Examples of system behaviour are documented using

business terminology

Automation The documentation is automated, creating living

documentation that verifies the system’s behaviour

BA led

BA reviewed

BA feedback

@letitia_fearon @sebrose

If you liked that, you’ll love this…

http://bddbooks.com

@letitia_fearon @sebrose

QUESTIONS?

Letitia Fearon BA Team Manager Lloyd’s of London

Seb Rose Director Cucumber Limited


Recommended