The document discusses agile requirements and specifications, focusing on impact mapping and story mapping techniques. It provides examples of how impact mapping and story mapping can be used to help define requirements, prioritize work, and ensure work delivers intended impacts and business goals. The document also discusses how specification by example techniques like acceptance criteria and example tests can help describe and validate technical specifications in an agile manner.
3. 5
Why agile requirements?
Successful problem solving requires
finding the right solution
to the right problem.
Russell Ackoff, 1974
We fail more often,
because we solve the wrong problem
than because we get the
wrong solution to the right problem.
4. 6
What makes user stories “agile”?
• Describe user needs or features
• Unit of planning/prioritization
Help solving the right problem
•Solution options
•Mechanism to defer detail
•Reminder for a conversation
•Evolve over time:
desired outcome specification
5. 7
People fear uncertainty:
They rather make a decision now
and run the risk of being wrong,
than continue in a state of
uncertainty.
- Chris Matts (@papachrismatts)
6. 8
Agile Requirements
Image from: 50 Quick ideas to improve your user stories: https://leanpub.com/50quickideas
@gojkoadzic, @DavidEvans66
Why?
(define upfront)
How?
(define just-in-time)
8. 10
Agile Requirements
Impact
Mapping
Image from: 50 Quick ideas to improve your user stories: https://leanpub.com/50quickideas
@gojkoadzic, @DavidEvans66
Why?
(define upfront)
How?
(define just-in-time)
9. 11
Our job is NOT
to develop software,
our job is to change the world.
- Jeff Patton (@jeffpatton)
10. 12
As a Sales Manager
I want a …-report
to monitor inventory
11. 13
As a Sales Manager
I want a …-report
to monitor inventory
12. 14
As a Sales Manager
I want a …-report
to monitor inventory faster
13. 15
Impact Mapping
From: Gojko Adzic: www.impactmapping.org (@gojkoadzic)
“Impact Mapping helps us plan better!
It is collaborative, visual and fast.”
17. 19
Sphere of influence
Zone of control
Influence vs. Control
Goal
Actors
Impacts
Deliverables
Increase turnover 3%
Increase
block buster
market share
Increase peak sales
One-Click
purchase
Mobile User Call Center
Buy more
online
Buy without
call center
Sell faster
Stop
cross selling
Purchase
with SMS
Mobile
Website
19. 21
Agile Requirements
Story
Mapping
Image from: 50 Quick ideas to improve your user stories: https://leanpub.com/50quickideas
@gojkoadzic, @DavidEvans66
Why?
(define upfront)
How?
(define just-in-time)
20. 22
Give 2% of users
a 100% of what they need,
not 100% of people
only 2% of their needs.
- Gojko Adzic (@gojkoadzic)
21. 23
Story Maps
• Design for particular
stakeholder impacts
• Slice and refine
deliverables (releases)
• Support backlog
management
• Inject dependent
features
• Overview and
collaboration
• Release planning
• Flexible scope Conceived by Jeff Patton in 2005
22. 24
Zone of control
Sphere of influence
Product Backlog:
Zone of control
User Journey: Sphere of influence
Structure
Discover
concerts
Purchase
tickets
Learn
more
Attend
concert
Upcoming
ticket sales
Additional
artist info
Pay by
credit card
Pay by
invoice
Print paper
ticket
Validate
ticket using
NCF
Concert
news
Likely order of
events
Mobile users
Buy more
online
Visit site
more often
Blockbuster
concert info
One-click
purchase
Deliverables
Impacts
User Activities
User Stories
23. 25
Structure
Hears about
concert
Tries to get
tickets
Waits for
concert
Attends
concert
Upcoming
ticket sales
Additional
artist info
Pay by
credit card
Pay by
invoice
Print paper
ticket
Validate
ticket using
NCF
Concert
news
Likely order of
events
Mobile user
24. 26
Prioritize per user activity
Hears about
concert
Tries to get
tickets
Waits for
concert
Attends
concert
Upcoming
ticket sales
Additional
artist info
Pay by
credit card
Pay by
invoice
Print paper
ticket
Validate
ticket using
NCF
Concert
news
Priority
Likely order of
events
Mobile user
25. 27
Walking
Skeleton
Prioritize slices
Upcoming
ticket sales
Additional
artist info
Pay by
credit card
Pay by
invoice
Print paper
ticket
Validate
ticket using
NCF
Concert
news
Priority
Manual
workaround
Not
supported
Hears about
concert
Tries to get
tickets
Waits for
concert
Attends
concert Likely order of
events
Mobile user
26. 28
Prioritize for deliverable
Visits site
more often
Blockbuster
concert info
Hears about
concert
Tries to get
tickets
Waits for
concert
Attends
concert Likely order of
events
Upcoming
ticket sales
Additional
artist info
Pay by
credit card
Pay by
invoice
Print paper
ticket
Validate
ticket using
NCF
Concert
news
Mobile user
27. 29
Prioritize for deliverable
Visits site
more often
Blockbuster
concert info
Hears about
concert
Tries to get
tickets
Waits for
concert
Attends
concert Likely order of
events
Upcoming
ticket sales
Additional
artist info
Pay by
credit card
Pay by
invoice
Print paper
ticket
Validate
ticket using
NCF
Concert
news
Mobile user
28. 30
Validate impact
Visits site
more often
Blockbuster
concert info
Hears about
concert
Tries to get
tickets
Waits for
concert
Attends
concert Likely order of
events
Upcoming
ticket sales
Additional
artist info
Pay by
credit card
Pay by
invoice
Print paper
ticket
Validate
ticket using
NCF
Concert
news
Impact on user
behaviour?
Impact on
business goal?
Mobile user
38. 40
Candidate Voter
Fund-
management
More
candidates
run for
election
More voters
participate in
election
Less effort
approving
candidates
Online
application
Candidates
published
online
Online voting
Shared
checklist
Other
funds
Use system
for their
elections
Customizable
branding
Pension Fund
More candidates
Higher voter turnout
No „silent“ elections
Broader
legitimised
committee
Reduced external costs
Less personnel effort
Additional revenue
Reduced cost
for running
elections
Less effort
counting
votes
39. 41
Nominate candidates
Story Map with initial backlog
83
76
58
78
59
60
61
63
8082
55
54
56
52
48
48.2
48.1
49
50
77
46
44
42
41
36 34 39
38 32
28
29
25
21
20 23
17
15 13 8
9
11
10
Provision and support
Vote and determine results
3 User Journeys
User Stories of
Initial Product Backlog
47. 49
Candidate Voter
Fund-
management
More
candidates
run for
election
More voters
participate in
election
Less effort
approving
candidates
Online
application
Candidates
published
online
Online voting
Shared
checklist
Other
funds
Use system
for their
elections
Customizable
branding
Pension Fund
More candidates
Higher voter turnout
No „silent“ elections
Broader
legitimised
committee
Reduced external costs
Less personnel effort
Additional revenue
Reduced cost
for running
elections
Less effort
counting
votes
Candidates
67 368
Staff
14 4
Customers
0
Project successful?
51. 53
Specification Workshops
public void TestInitialOrderDiscount()
{
Customer newCustomer = new Customer();
Order newOrder = new Order(newCustomer);
newOrder.AddBook(
Catalog.Find(“ISBN-0955683610”)
);
Assert.Equals(33.75,
newOrder.Subtotal);
}
Register as “bart_bookworm”
Go to “/catalog/search”
Enter “ISBN-0955683610”
Click “Search”
Click “Add to Cart”
Click “View Cart”
Verify “Subtotal” is “$33.75”
We would like to encourage new users to
buy in our shop.
Therefore we offer 10% discount for their
first order.
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
54. 56
Specification Workshops
public void TestInitialOrderDiscount()
{
Customer newCustomer = new Customer();
Order newOrder = new Order(newCustomer);
newOrder.AddBook(
Catalog.Find(“ISBN-0955683610”)
);
Assert.Equals(33.75,
newOrder.Subtotal);
}
Register as “bart_bookworm”
Go to “/catalog/search”
Enter “ISBN-0955683610”
Click “Search”
Click “Add to Cart”
Click “View Cart”
Verify “Subtotal” is “$33.75”
We would like to encourage new users to
buy in our shop.
Therefore we offer 10% discount for their
first order.
Original idea for the illustration: George Dinwiddie (@gdinwiddie)
http://blog.gdinwidiee.com
55. 57
… illustrated with formalized examples
Given the user has not ordered yet
When the user adds a book with the price of EUR 37.5
into the shopping cart
Then the shopping cart sub-total is EUR 33.75.
Original idea for the illustration: George Dinwiddie (@gdinwiddie)
http://blog.gdinwidiee.com
We would like to encourage new users to
buy in our shop.
Therefore we offer 10% discount for their
first order.
56. 58
Discover hidden assumptions
Actually, this is not quite right:
Books on sale should be excluded.
Original idea for the illustration: George Dinwiddie (@gdinwiddie)
http://blog.gdinwidiee.com
59. 61
Collecting Acceptance Criteria
“I would try to put a book into the
shopping cart …”
“I would try to remove a book
from the shopping cart…”
“I’d check whether the shopping cart
is empty, when I enter the shop …”
Books can be added to
shopping cart.
Books can be removed from
shopping cart.
Shopping cart should be empty
when entering the shop.
... ? …
As a potential customer
I want to collect books in a shopping cart
So that I can order several books at once.
“Imagine this story is
already implemented:
How would you verify it?”
“I would try to add 1000 books to
the shopping cart …”
60. 62
Exploration through examples
Books in catalogue:
Title Author
Specification-By-Example Gojko Adzic
Impact Mapping Gojko Adzic
Explore It! Elisabeth Hendrickson
Competitive Engineering Tom Gilb
… I want to find books in the catalogue by author and title
Search for … Books found …
Spec Specification-By-Example
Hend Explore It!
et Explore It!, Competitive Engineering
Context
Action
Assertion
61. 63
Key examples: Breaking the model
Books in catalogue:
Title Author
Specification-By-Example Gojko Adzic
Impact Mapping Gojko Adzic
Explore It! Elisabeth Hendrickson
Competitive Engineering Tom Gilb
… I want to find books in the catalogue by author and title
Search for … Books found …
Spec Specification-By-Example
Hend Explore It!
et Explore It!, Competitive Engineering
What happens, if I search for
“Explore Specification”?
Can I search for single
characters, e.g. “e”?
Is the number of search results
limited, or paged?
Is the search also performed in the
sub-title of a book?
63. 65
Abstract acceptance criteria
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books can be added to the shopping basket
Books can be removed from the shopping basket
Shopping basket is initially empty
The same book can be added multiple times to the shopping
basket
64. 66
Scenarios: Examples in Gherkin
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books can be added to the shopping basket
Given my shopping basket is empty
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 1 copy of “Harry Potter”
65. 67
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books can be added to the shopping basket
Scenarios: Examples in Gherkin
Given my shopping basket contains 1 copy of “Harry Potter”
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 2 copies of “Harry Potter”
The same book can be added multiple times to the shopping basket
66. 68
The same book can be added multiple times to the shopping basket
Structure of Scenarios
Given my shopping basket contains 1 copy of “Harry Potter”
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 2 copies of “Harry Potter”
Title: Describes intention/abstract acceptance criterion
Arrange: Context, describes state of the system
Act: Execution of the feature
Assert: Assertion of observable behaviour
And I should see the warning: “Book already existed in basket”
Triple-A
constraint
“Checks”
Chaining
up steps
67. 69
Purpose of the examples
• Shared understanding:
acceptance criteria
• Documentation:
specification details
• Regression-tests:
violated specifications
68. 70
Automated continuous validation
Given my shopping basket contains 1 copy of “Harry Potter”
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 2 copies of “Harry Potter”
System
„Step Definitions“ are binding individual steps
to an automatable interface of the application.
Automatable
interface
UI
Automation
Automation does not necessarily have to bind to the UI.
Automatability of system is supported/evolving with development.
70. 72
SpecFlow in 2014 – BDD for .NET
#82inVisual StudioGallery based on popularity (6.11.2014)
#26in NuGet based on recent installs (6.11.2014)
~1'000 visits daily
> 25’000 active users
> 30 contributors
91. 93
Evolving Specifications
Product/Sprint Backlog
User Story 1
AccCrit 1
AccCrit 2
User Story 2
AccCrit 3
AccCrit 4
Living Documentation
Feature 1
AccCrit 1
AccCrit 2
Feature n
AccCrit 4
AccCrit m
User Story n
AccCrit 5
AccCrit m
AccCrit 3
AccCrit 5
„Done“
• Future options of the system
• Organized/refined according to
priority, value, effort, risk, ...
• Next possible increments of
the product (units of work)
• Current state of the system
• Organized/refined for
functional overview
• Versioned and maintained
together with source code
93. 95
Test automation becomes expensive
when …
• trying to automate
manual tests
• making tests
unreadable when
automating them
• automating after
completing
development
structure
readability
point in time
94. 96
Structure
Manual tests
Asserts Multiple combined
features
Structure ACT-ASSERT-
ACT-ASSERT-
ACT-ASSERT-
…
Dependent features
Long test path with
high chance to break
Cause and impact of
error hard to trace
Automated Check
Single aspect of a
single feature
ARRANGE –
ACT –
ASSERT
Independent features
Short test path with
lower chance to break
Cause and impact of
error easy to relate
96. 98
// Go to web page 'http://localhost:40001/' using new browser instance
BrowserWindow localhostBrowser = BrowserWindow.Launch(
new System.Uri(this.RecordedMethod1Params.Url));
// Click 'Register found item' link
Mouse.Click(uIFundstückerfassenHyperlink, new Point(56, 9));
// Click 'Save' button
Mouse.Click(uISpeichernButton, new Point(44, 14));
int fundNr1 = int.Parse(uIFundNr127Pane.InnerText.Substring(9));
// Click 'Register found item' link
Mouse.Click(uIFundstückerfassenHyperlink, new Point(63, 7));
// Click 'Save' button
Mouse.Click(uISpeichernButton, new Point(34, 11));
int fundNr2 = int.Parse(uIFundNr128Pane.InnerText.Substring(9));
Assert.IsTrue(fundNr1 + 1 == fundNr2);
// Click 'Close' button
Mouse.Click(uICloseButton, new Point(26, 11));
Readability
97. 99
A readable test case
Scenario: New found items should receive a
consecutive number for the current year
Given the previous found item of the
current year had the number 145
When I register a new found item
Then the last found item of the
current year should have the number 146
98. 100
When to test (point in time)
Acceptance criteria
(ATDD, BDD)
Unit Tests
(TDD)
business view
technical view
Exploratory tests
Workflow tests
Performance, Scalability,
Usability,Security, …
definingtheproduct
criticizingtheproduct
New dimension: defining the product
Synergy: Specification of requirements and tests
Agile Testing Quadrants: Brian Marick
100. 102
Manual Testing is always necessary!
User
journeys
Acceptance-
criteria
Units
exploratory
testing
Source: Mike Cohn
many
few
harder
easier
Automatability
Manual
Check
after
Story
Done
Main
success
pathes
Undiscovered
acceptance
criteria
No/(few)
manual
regression
checks
Few pathes
are enough
More time
for exploration
101. 103
Cross-functional work
Sprint 1 Sprint 2 Sprint 3
short iteration
US4
Plan
Implement &
autom. test
US5
Plan
Implement &
autom. test
US2
Plan
Implement &
autom. test
US3
Plan
Implement &
autom. test
US6
Plan
Implement &
autom. test
US1
Plan
Implement &
autom. test
US7
Plan
Implement &
autom. test
US8
Plan
Implement &
autom. test
US9
Plan
Implement &
autom. test
ExploratoryTests
Specification and test
Collaboration for defining
acceptance criteria
Collaboration for
automation
Preventing bugs
instead of finding them!
Extension of
“Test Cases”
Limit
WIP
Collaboration
in manual
testing
105. 107
ATDD cycle
Write a
failing
unit test
Make the
test pass
Refactor
Write a failing
acceptance
test
Deploy and
measure
impact
Refine feature, if needed
(new user story)
break down
units
extend
systemUser Story
AC/Scenario 1
AC/Scenario 2
AC/Scenario …
AC/Scenario n
modify
system
Expected
impact
121. 123
Books
50 Quick Ideas
to improve your
User Stories
Gojko Adzic
David Evans
@gojkoadzic
@DavidEvans66
User Story
Mapping
Jeff Patton
@jeffpatton
Impact Mapping
Gojko Adzic
@gojkoadzic
123. 126
Product Owner Survival Camp
Across Europe
With: Gojko Adzic, David Evans, Chris Matts,
Christian Hassa
Special Guests:
Jeff Patton (Stockholm, 11/2014)
Ellen Gottesdiener (Vienna, 3/2015)
www.ProductOwnerSurvivalCamp.com
124. TechTalk: put this into daily practice
• Agile Software Development
• Consulting and Delivery
• Offices: Zurich, Vienna, Budapest
• Founded: 1993
TechTalk office, Vienna/Austria
125. 129
Work with us …
Projects Experts
Agile
Coaching
&
Training
More information at http://www.techtalk.at/?lang=en-US