feature mapping workshop

57
AUTHOR OF ‘BDD IN ACTION’ @wakaleo www.johnfergusonsmart.com Feature Mapping The fast track from stories to acceptance criteria Jan Molak Lead Developer of Serenity/JS @janmolak janmolak.com

Upload: john-ferguson-smart-limited

Post on 28-Jan-2018

191 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Feature Mapping Workshop

AUTHOR OF ‘BDD IN ACTION’

@wakaleo

www.johnfergusonsmart.com

Feature MappingThe fast track from stories to acceptance criteria

Jan MolakLead Developer of Serenity/JS

@janmolak

janmolak.com

Page 2: Feature Mapping Workshop

Overview

Overview

What we will cover

BDD and Sprint Planning

Acceptance Criteria and the Definition of Done

Writing acceptance criteria in Gherkin

Acceptance criteria with Feature Mapping

Page 3: Feature Mapping Workshop

Overview

Overview

http://bit.ly/feature-mapping-draw

Before we finish…

Fill in the survey and win a book!

Page 4: Feature Mapping Workshop

BDD and Sprint Planningin a nutshell

Page 5: Feature Mapping Workshop

Overview

OverviewValidation

The BDD Way

Collaboration

As a corporate frequent flyer I want to earn points on my business flights So that I can get discounts on my holiday flights

Business

Scenario: First class earns double points Given London-Paris in economy earns 100 points When I fly from London to Paris in First Class Then I should earn 200 points

SHARED UNDERSTANDING

Automation

Page 6: Feature Mapping Workshop

Overview

Overview

The BDD Way

BA

Business BA UX

Testers

Business RulesExamplesA shared understanding

Executable SpecificationsWireframes

VisionFlowCapabilitiesFeatures

Developers UI Designers

Define

Formalise

Automate

AutomatedAcceptance

Testing

FeedbackVisibility

Valuable Software

Deliver

Discover

TDD

Page 7: Feature Mapping Workshop

Overview

OverviewShared

Understanding and Automated

Validation

Automated Acceptance

CriteriaA Shared

Understanding Validation

Collaborative Requirements

DiscoveryLiving

Documentation

Regression Tests

Change with confidence

Effective Automation

Sustainable Automation

Executable Requirements

Story Mapping

3 amigos

Acceptance Criteria

Feature Mapping

Example Mapping

Impact Mapping

Sprint Planning

Gherkin Format

Page 8: Feature Mapping Workshop

Overview

OverviewShared

Understanding and Automated

Validation

Automated Acceptance

CriteriaA Shared

Understanding Validation

Collaborative Requirements

DiscoveryLiving

Documentation

Regression Tests

Change with confidence

Effective Automation

Sustainable Automation

Executable Requirements

Story Mapping

3 amigos

Acceptance Criteria

Feature Mapping

Example Mapping

Impact Mapping

Sprint Delivery

Gherkin Format

Sprint Planning

Page 9: Feature Mapping Workshop

Acceptance Criteria and the definition of done

Page 10: Feature Mapping Workshop

Acceptance Criteria

✓ Define the Definition of Done

✓ Functional and non-functional requirements

✓ Expressed in business language

✓ Describe expected outcomes, not inputs

✓ Describe intent, not solution (what, not how)

✓ Easily testable

✓ Single responsibility

Page 11: Feature Mapping Workshop

Acceptance Criteria

should be simple

✓ Simple phrases

- “A teacher can return an essay for correction when the average mark is under 7”

✓ Can be non-functional

- “A teacher should be able to open and record the marks of an essay in less than 30 seconds on average with a load of 1000 simultaneous users”

Page 12: Feature Mapping Workshop

Examples are concrete

scenarios that illustrate rules

✓ “The one where…”

- “The one where the student submits a bad essay”

✓ Given/When/Then

- “Given Stu submits an essay with an average mark of 4 When Tess records the marks Then she has the option of returning the essay to Stu”

Page 13: Feature Mapping Workshop

Writing Acceptance Criteria in Gherkin

Page 14: Feature Mapping Workshop

GherkinThe Lingua Franca of BDD

Collaboration

Automation

Feature: Earning Frequent Flyer points through flights

Scenario: Economy flights earn points by distance Flyers earn 1 point per kilometre travelled Given the distance from London to Paris is 344 km When I fly from London to Paris in Economy Then I should earn 344 points

Page 15: Feature Mapping Workshop

Overview

OverviewScenario: Economy flights earn points by distance Given the distance from London to Paris is 344 km When I fly from London to Paris in Economy Then I should earn 344 points

Preconditions

Action to illustrate

Expected outcome

Page 16: Feature Mapping Workshop

Overview

OverviewScenario Outline: Economy flights earn points by distance Given the distance from <departure> to <dest> is <distance> km When I fly from <departure> to <destination> in <class> class Then I should earn <points> points

Examples: | departure | dest | distance | class | points | | Paris | London | 344 | economy | 344 | | Paris | London | 344 | first | 688 |

A table of examples

Page 17: Feature Mapping Workshop

Let’s give it a try!

Page 18: Feature Mapping Workshop

Workshop Time! As a regular business traveller

I want to earn privileges when I fly

So that I can take my family on holiday more often

Create Acceptance criteria for the following rules- Member privileges are based on their Frequent Flyer level - Members can be Bronze, Silver, Gold or Platinum - Levels are earned based on distance and cabin class

Page 19: Feature Mapping Workshop

Retrospective • How much functionality did you cover?

• How would you judge the quality of the scenarios you wrote?

• How well did it help you understand the problem domain?

• How many surprises did you find?

Page 20: Feature Mapping Workshop

In the last exercise…Did you spend more time

collaborating or formalising?

Page 21: Feature Mapping Workshop

Overview

Overview

establishes validatesShared Understanding

Collaboration Formalisation

Sprint Planning

Page 22: Feature Mapping Workshop

Overview

Overview

establishes validatesShared Understanding

Collaboration Formalisation

Sprint Delivery

Page 23: Feature Mapping Workshop

Now for something differentStep Away From The Gherkin

Page 24: Feature Mapping Workshop

Understanding a requirement

As a Frequent Flyer member I want to see where I can travel with my current point balance So that I can plan my next holiday

Page 25: Feature Mapping Workshop

Overview

Overview

As a Frequent Flyer member I want to see where I can travel with my current point balance So that I can plan my next holiday

“The flights available depend on the number of points” “Rule”

“The one where a member has 10000 points” “Example”

“Jackie has 10000 points, and lives in London. “Steps”“She chooses to view her flight options.”

“She can choose from flights to Edinburgh, Paris and Amsterdam”

Page 26: Feature Mapping Workshop

Overview

Overview

As a Frequent Flyer member I want to see where I can travel with my current point balance So that I can plan my next holiday

“The flights available depend on the number of points” “Rule”

“The one where a member has 10000 points” “Example”

“Jackie has 10000 points, and lives in London. “Steps”“She chooses to view her flight options.”

“She can choose from flights to Edinburgh, Paris and Amsterdam”

What if she lives somewhere else?

What if she wants to fly from another city?

Are these economy flights?

What if the wants to fly business?

What if she wants to book a flight for someone else?

Why these destinations?

Page 27: Feature Mapping Workshop

Questions lead to learning

Why these destinations?

“The flights available depend on the number of points” (1 km distance for every 10 points)

New or clarified rules

points Edinburgh

1000

Paris Amsterdam

5000

10000

Yes

Yes

No

No

Yes Yes

NoNo

No

New or clarified examples

Page 28: Feature Mapping Workshop

Feature Mapping

Page 29: Feature Mapping Workshop

Rules explain Examples

Examples illustrate Rules

Steps explore Examples

Questions challenge everything

Four Principles

Page 30: Feature Mapping Workshop

List the rules you know

Ask for examples

Explore the steps that make up each example

Question, challenge, expand

And Four Steps

Page 31: Feature Mapping Workshop

Leave no assumption unchallenged

“If you do not know how to ask the right question, you discover nothing.”

- W. Edwards Deming

Page 32: Feature Mapping Workshop

Feature Mapping Building Bricks

Page 33: Feature Mapping Workshop

Overview

Overview

We start with an anchoring example

“Fred has 10000 points and lives in London. He wants to go on holidays in August. He checks his account balance, and sees that he can go to Rome,

Aberdeen or Barcelona.”

Page 34: Feature Mapping Workshop

Overview

Overview

Step 1) Find a rule

“Guideline"

Page 35: Feature Mapping Workshop

Overview

Overview

Step 1) Find a rule

“Guideline"

A rule

Any economy flight within Europe is 10000 points

Page 36: Feature Mapping Workshop

Overview

Overview“Guideline"

A rule

Any economy flight within Europe is 10000 points

Step 2) “Give me an example”An example

Member has enough to fly to Rome

Page 37: Feature Mapping Workshop

Overview

Overview“Guideline"

A rule

Any economy flight within Europe is 10000 points

Step 3) Break it down

An example

Member has enough to fly to Rome

=>Fred has 10000

points

=>Fred can fly to

Edinburgh, Barcelona or Rome

Consequences

Page 38: Feature Mapping Workshop

Overview

Overview

Any economy flight within Europe is 10000 points

Step 4) Explore variations

Member has enough to fly to Rome

Member doesn’t have enough points

=> Joe has just joined the

program and has 0 points

=> Joe can’t go anywhere

=>Fred has 10000

points

=>Fred can fly to

Edinburgh, Barcelona or Rome

Page 39: Feature Mapping Workshop

Overview

OverviewAny economy flight within Europe is 10000 points

Step 5) Discover new rules

Member has enough to fly to Rome

Member doesn’t have enough points

A business flight within Europe

is 20000 pointsLikes to fly in style

=> Fred can fly to Edinburgh, Barcelona or Rome in Business

=> Barry has 20000 points

=> Joe has just joined the

program and has 0 points

=> Joe can’t go anywhere

=>Fred has 10000

points

=>Fred can fly to

Edinburgh, Barcelona or Rome

Page 40: Feature Mapping Workshop

Overview

OverviewAny economy flight within Europe is 10000 points

Step 6) Learn and refactor

Member has enough to fly to Rome

Member doesn’t have enough points

A business flight within Europe

is 20000 pointsLikes to fly in style

The available destinations depends on the number of

points and the cabin class

=> Fred can fly to Edinburgh, Barcelona or Rome in Business

=> Barry has 20000 points

=> Joe has just joined the

program and has 0 points

=> Joe can’t go anywhere

=>Fred has 10000

points

=>Fred can fly to

Edinburgh, Barcelona or Rome

Page 41: Feature Mapping Workshop

Overview

OverviewAny economy flight within Europe is 10000 points

Questions record uncertainty

Member has enough to fly to Rome

Member doesn’t have enough points

A business flight within Europe

is 20000 pointsLikes to fly in style

The available destinations depends on the number of

points and the cabin class

Can he buy someone else a ticket?

Are points transferrable?

=> Fred can fly to Edinburgh, Barcelona or Rome in Business

=> Barry has 20000 points

=> Joe has just joined the

program and has 0 points

=> Joe can’t go anywhere

=>Fred has 10000

points

=>Fred can fly to

Edinburgh, Barcelona or Rome

Page 42: Feature Mapping Workshop

Overview

OverviewAny economy flight within Europe is 10000 points

Questions record uncertainty

Member has enough to fly to Rome

Member doesn’t have enough points

A business flight within Europe

is 20000 pointsLikes to fly in style

The available destinations depends on the number of

points and the cabin class

“Poi

nts

per d

estin

atio

n”

stor

y“P

oint

s pe

r cla

ss”

stor

y

=> Fred can fly to Edinburgh, Barcelona or Rome in Business

=> Barry has 20000 points

=> Joe has just joined the

program and has 0 points

=> Joe can’t go anywhere

=>Fred has 10000

points

=>Fred can fly to

Edinburgh, Barcelona or Rome

Page 43: Feature Mapping Workshop

Let’s give it a try!

Page 44: Feature Mapping Workshop

Mob Mapping!As a regular business traveller

I want to be able to access the lounge with my travel companions

So that I can get more work done before the flight

Page 45: Feature Mapping Workshop

Overview

OverviewLounge Access As a regular business traveller I want to be able to access the lounge with my travel companions

So that I can get more work done before the flight

Step 1) “Tell me a story”

“Barry the business traveller is Gold status, and flying on holidays in economy with his wife and two children. He asks to access the lounge with his family. He is given access, but has to use all of his yearly guest passes as he can normally only invite one guest.”

Page 46: Feature Mapping Workshop

Overview

OverviewAs a regular business traveller I want to be able to access the lounge with my travel companions

So that I can get more work done before the flight

Step 2) “Tell me the rules you know about”

“Barry the business traveller is Gold status, and flying on holidays in economy with his wife and two children. He asks to access the lounge with his family. He is given access, but has to use all of his yearly guest passes as he can normally only invite one guest.”

What else?

Gold Frequent Flyers can come with a guest

Gold Frequent Flyers get two

guest passes per year that they

can use for additional guests

Page 47: Feature Mapping Workshop

Overview

OverviewAs a regular business traveller I want to be able to access the lounge with my travel companions

So that I can get more work done before the flight

Step 3) Pick a rule.

“Barry the business traveller is Gold status, and flying on holidays in economy with his wife and two children. He asks to access the lounge with his family. He is given access, but has to use all of his yearly guest passes as he can normally only invite one guest.”

Gold Frequent Flyers get two

guest passes per year that they

can use for additional guests

Page 48: Feature Mapping Workshop

Overview

Overview

Step 4) Give me an example

Gold Frequent Flyers get two guest passes per year that they

can use for additional guests

Barry can invite his family because he is a Gold FF

“The one where…”

Barry is a Gold FF

Barry wants to bring 3 guests

=> Everyone can enter the lounge

=> Barry has no guest passes left

Barry has 2 guest passes

Barry agrees to use his guest passes

Page 49: Feature Mapping Workshop

Overview

Overview

Step 5) Explore and challenge

Gold Frequent Flyers get two guest passes per year that they

can use for additional guests

Barry can invite his family because he is a Gold FF

“What if…”

Barry is a Gold FF

Barry wants to bring 3 guests

=> Everyone can enter the lounge

=> Barry has no guest passes left

Barry has 2 guest passes

Barry agrees to use his guest passes

What if

Barry i

s Silve

r?

What if

Barry h

as

only

1 gue

st

What if

Barry

doesn

’t wan

t to

use h

is gue

st

passe

s?

=> Everyone can enter the lounge

=> Barry has no guest passes left

Page 50: Feature Mapping Workshop

Now work in teams As a business traveller

I want to have access to a place to freshen up and work

when I land So that I can be more productive in my work

Page 51: Feature Mapping Workshop

Now work in teams

As a business traveller

I want to have access to a place to freshen up and work when I land

So that I can be more productive in my work

“Barry has landed 6 hours ahead of his meeting, and wants to freshen up, have breakfast and prepare his meeting. He goes to the lounge in the arrival airport, and is granted access.”

Page 52: Feature Mapping Workshop

Overview

Overview

Page 53: Feature Mapping Workshop

Key Take Aways

Page 54: Feature Mapping Workshop

Feature Mapping

Collaborative Iterative Exploratory

A requirements discovery practice that is…

Page 55: Feature Mapping Workshop

Feature Mapping

Breadth Depth Context

Page 56: Feature Mapping Workshop

Feature Mapping

More precise than free-form

acceptance criteriaFaster than Gherkin Easy to automate