Date post: | 15-Jul-2015 |
Category: |
Technology |
Upload: | chassa |
View: | 2,155 times |
Download: | 0 times |
CHRISTIAN HASSA ([email protected]), @CHRISHASSA
MANAGING PARTNER
February 2015
Agile RequirementsFrom Impacts to Specifications
4
Agile“Requirements”
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 problemthan because we get thewrong solution to the right problem.
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
7
People fear uncertainty:They rather make a decision nowand run the risk of being wrong,
than continue in a state of uncertainty.
- Chris Matts (@papachrismatts)
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)
9
Project Success
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)
11
Our job is NOTto develop software,
our job is to change the world.- Jeff Patton (@jeffpatton)
12
As a Sales Manager
I want a …-report
to monitor inventory
13
As a Sales Manager
I want a …-report
to monitor inventory
14
As a Sales Manager
I want a …-report
to monitor inventory faster
15
Impact Mapping
From: Gojko Adzic: www.impactmapping.org (@gojkoadzic)
“Impact Mapping helps us plan better!It is collaborative, visual and fast.”
16
Impact Maps
Goal
Actors
Impacts
Deliverables
Increase peak sales
Mobile User
Buy more online
MobileWebsite
17
Evaluate Options
Goal
Actors
Impacts
Deliverables
Increase peak sales
One-Clickpurchase
Mobile User Call Center
Buy more online
Buy without call center
Sell faster
Stopcross selling
Purchasewith SMS
MobileWebsite
18
Hierarchical goals
Goal
Actors
Impacts
Deliverables
Increase turnover 3%
Increase block buster market share
Increase peak sales
One-Clickpurchase
Mobile User Call Center
Buy more online
Buy without call center
Sell faster
Stopcross selling
Purchasewith SMS
MobileWebsite
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-Clickpurchase
Mobile User Call Center
Buy more online
Buy withoutcall center
Sell faster
Stopcross selling
Purchasewith SMS
MobileWebsite
20
Feedback andProduct Design
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)
22
Give 2% of usersa 100% of what they need,
not 100% of peopleonly 2% of their needs.
- Gojko Adzic (@gojkoadzic)
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
24
Zone of control
Sphere of influence
Product Backlog:Zone of control
User Journey: Sphere of influence
Structure
Discoverconcerts
Purchasetickets
Learnmore
Attendconcert
Upcomingticket sales
Additional artist info
Pay bycredit card
Pay byinvoice
Print paperticket
Validateticket using
NCF
Concert news
Likely order ofevents
Mobile users
Buy moreonline
Visit sitemore often
Blockbusterconcert info
One-clickpurchase
Deliverables
Impacts
User Activities
User Stories
25
Structure
Hears aboutconcert
Tries to gettickets
Waits forconcert
Attendsconcert
Upcomingticket sales
Additional artist info
Pay bycredit card
Pay byinvoice
Print paperticket
Validateticket using
NCF
Concert news
Likely order ofevents
Mobile user
26
Prioritize per user activity
Hears aboutconcert
Tries to gettickets
Waits forconcert
Attendsconcert
Upcomingticket sales
Additional artist info
Pay bycredit card
Pay byinvoice
Print paperticket
Validateticket using
NCF
Concert news
Pri
ori
ty
Likely order ofevents
Mobile user
27
WalkingSkeleton
Prioritize slices
Upcomingticket sales
Additional artist info
Pay bycredit card
Pay byinvoice
Print paperticket
Validateticket using
NCF
Concert news
Pri
ori
ty
Manual workaround
Not supported
Hears aboutconcert
Tries to gettickets
Waits forconcert
Attendsconcert Likely order of
events
Mobile user
28
Prioritize for deliverable
Visits sitemore often
Blockbusterconcert info
Hears aboutconcert
Tries to gettickets
Waits forconcert
Attendsconcert Likely order of
events
Upcomingticket sales
Additional artist info
Pay bycredit card
Pay byinvoice
Print paperticket
Validateticket using
NCF
Concert news
Mobile user
29
Prioritize for deliverable
Visits sitemore often
Blockbusterconcert info
Hears aboutconcert
Tries to gettickets
Waits forconcert
Attendsconcert Likely order of
events
Upcomingticket sales
Additional artist info
Pay bycredit card
Pay byinvoice
Print paperticket
Validateticket using
NCF
Concert news
Mobile user
30
Validate impact
Visits sitemore often
Blockbusterconcert info
Hears aboutconcert
Tries to gettickets
Waits forconcert
Attendsconcert Likely order of
events
Upcomingticket sales
Additional artist info
Pay bycredit card
Pay byinvoice
Print paperticket
Validateticket using
NCF
Concert news
Impact on userbehaviour?
Impact on business goal?
Mobile user
31
Slice User Stories
Milestone 1
Milestone 3
Milestone 4
32
Slice Releases
Milestone 1 Milestone 2
Milestone 3
Milestone 4
33
Tools
34
Creation of Story Maps
35
Trace from outputs to inputs
Outputs:• Approved list of candidates• Published profiles of candidates• Election result
36
Transport and Conservation
37
Product Design with Story Maps
38
Visual collaboration
39
Case Study
40
Candidate VoterFund-
management
More candidates
run for election
More voters participate in
election
Less effort approving candidates
Online application
Candidates published
onlineOnline voting
Shared checklist
Otherfunds
Use systemfor theirelections
Customizable branding
Pension Fund
More candidatesHigher voter turnoutNo „silent“ elections
Broaderlegitimisedcommittee
Reduced external costsLess personnel effortAdditional revenue
Reduced costfor running
elections
Less effort counting
votes
41
Nominate candidates
Story Map with initial backlog
83
76
58
78
59
60
61
638082
55
54
56
52
48
48.2
48.1
49
50
77
46
44
42
41
36 34 39
38 32
2829
2521
20 23
17
15 13 8
9
11
10
Provision and support
Vote and determine results
3 User Journeys
User Stories ofInitial Product Backlog
42
Sprint 1
83
76
58
78
59
60
61
638082
55
54
56
52
48
48.2
48.1
49
50
77
46
44
42
41
36 34 39
38 32
2829
2521
20 23
17
15 13 8
9
11
10
Provision and support
Nominate candidates
Vote and determine results
43
Sprint 2
83
76
58
78
59
60
61
638082
55
54
56
52
48
48.2
48.1
49
50
77
46
44
42
41
36 34 39
38 32
2829
2521
20 23
17
15 13 8
9
11
10
Provision and support
Nominate candidates
Vote and determine results
44
Sprint 3
83
76
58
78
59
60
61
638082
55
54
56
52
48
48.2
48.1
49
50
77
46
44
42
41
36 34 39
38 32
2829
2521
20 23
17
15 13 8
9
11
10
Provision and support
Nominate candidates
Vote and determine results
45
Dropped user stories
83
76
58
78
59
60
61
638082
55
54
56
52
48
48.2
48.1
49
50
77
46
44
42
41
36 34 39
38 32
2829
2521
20 23
17
15 13 8
9
11
10
Provision and support
Nominate candidates
Vote and determine results
46
Added user stories
83
76 89
58
78
59
60
61
638082
55
54
56
90
52
48
48.2
48.1
49
50
9177
46
44
42
41
36 34 39
38 32
2829
2521
20 23
17
15 13 8
9
11
10
Provision and support
Nominate candidates
Vote and determine results
47
Sprint 4
83
76 89
58
78
59
60
61
638082
55
54
56
90
52
48
48.2
48.1
49
50
9177
46
44
42
41
36 34 39
38 32
2829
2521
20 23
17
15 13 8
9
11
10
Provision and support
Nominate candidates
Vote and determine results
48
Flexible scope
83
76 89
58
78
59
60
61
638082
55
54
56
90
52
48
48.2
48.1
49
50
9177
46
44
42
41
36 34 39
38 32
2829
2521
20 23
17
15 13 8
9
11
10
Provision and support
Nominate candidates
Vote and determine results
49
Candidate VoterFund-
management
More candidates
run for election
More voters participate in
election
Less effort approving candidates
Online application
Candidates published
onlineOnline voting
Shared checklist
Otherfunds
Use systemfor theirelections
Customizable branding
Pension Fund
More candidatesHigher voter turnoutNo „silent“ elections
Broaderlegitimisedcommittee
Reduced external costsLess personnel effortAdditional revenue
Reduced costfor running
elections
Less effort counting
votes
Candidates67 368
Staff14 4
Customers0
Project successful?
50
Specifications
51
Agile Requirements
Specification-
By-Example
Image from: 50 Quick ideas to improve your user stories: https://leanpub.com/50quickideas@gojkoadzic, @DavidEvans66
Why?(define upfront)
How?(define just-in-time)
52
Agile Specifications
Why?Impact
How?Specification earlier later
Code
Reminderfor aconversation
Goals
Impacts
Epics
User Stories
Acceptance-criteria
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 Dinwiddiehttp://blog.gdinwidiee.com
54
Acceptance-criteria
Why?Impact
How?Specification earlier later
Code
Goals
Impacts
Epics
User Stories
Bugs
Agile Specifications
55
Specification-By-Example
Examples ……make abstract descriptions better understandable
…are usually not formally documented or exchanged
Example Tests
Specifications
consist of
describe validate fulfillment
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
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.
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
Collaboration: 3 amigos
“HappyPath”
Technical feasability
Exceptions, border cases
Original idea for the illustration: George Dinwiddie (@gdinwiddie)http://blog.gdinwidiee.com
60
Structuringthe conversation
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 customerI want to collect books in a shopping cartSo 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 …”
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
ActionAssertion
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?
64
UI wire frames,existing UI
rules, key examples
existing artifacts,samples
Different kinds of examples
65
Abstract acceptance criteria
As a shop visitorI want to collect books in my shopping basketso 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
66
Scenarios: Examples in Gherkin
As a shop visitorI want to collect books in my shopping basketso 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”
67
As a shop visitorI want to collect books in my shopping basketso 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
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-Aconstraint“Checks”
Chainingup steps
69
Purpose of the examples
• Shared understanding:acceptance criteria
•Documentation:specification details
• Regression-tests:violated specifications
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 stepsto an automatable interface of the application.
Automatableinterface
UIAutomation
Automation does not necessarily have to bind to the UI.
Automatability of system is supported/evolving with development.
71
Different levels of automation
72
SpecFlow in 2014 – BDD for .NET
#82 in Visual Studio Gallery based on popularity (6.11.2014)
#26 in NuGet based on recent installs (6.11.2014)
~1'000 visits daily
> 25’000 active users> 30 contributors
73
SpecificationExamples
74
Booking system
75
Payroll calculation
76
eVoting system
77
Examples in Excel
78
End-EndALM Toolsupport
79
Development Platform (Java, .NET, Ruby, PHP)
Version Control System (Git, TFS-VC)
Workitem Tracking (JIRA, TFS)
SpecLog
Story Maps
Product Backlog
SprintBacklog
Task Board
Gherkin ScenariosTest-auto-mation
Product
LivingDocumen-
tation
Development Platform (Java, .NET, Ruby, PHP)
80
Story Maps in SpecLog
Story MapsUser activities
Priority
81
Product Backlog in Workitems
Product Backlog
82
Acceptance Criteria in SpecLog
SprintBacklog
83
Acceptance Criteria in Workitems
SprintBacklog
84
Tasks in Workitems
Task Board
85
Version Controlled Scenarios
SpecFlow Scenarios
86
Scenarios tested with each Build
Test-auto-mation
87
Scenarios linked in SpecLog
LivingDocumen-
tation
88
Living documentation in SpecLog
Drill into Details(Gherkin scenarios)
Overview(Story Map)
89
Living documentation in HTML
LivingDocumen-
tation
90
Living documentation: Validation
91
Version Control System (Git, TFS-VC)
Workitem Tracking (JIRA, TFS)
SpecLog
Story Maps
Product Backlog
SprintBacklog
Task Board
Gherkin ScenariosTest-auto-mation
Product
LivingDocumen-
tation
Development Platform (Java, .NET, Ruby, PHP)
92
Livingdocumentation
93
Evolving Specifications
Product/Sprint Backlog
User Story 1AccCrit 1
AccCrit 2
User Story 2AccCrit 3
AccCrit 4
Living Documentation
Feature 1
AccCrit 1
AccCrit 2
Feature nAccCrit 4
AccCrit mUser Story n
AccCrit 5
AccCrit m
AccCrit 3AccCrit 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
94
Impact on
testing
95
Test automation becomes expensivewhen …
• trying to automate
manual tests
• making tests
unreadable when
automating them
• automating after
completing
development
structure
readability
point in time
96
StructureManual tests
Asserts Multiple combined features
Structure ACT-ASSERT-ACT-ASSERT-ACT-ASSERT-…
Dependent featuresLong test path with high chance to breakCause and impact of error hard to trace
Automated Check
Single aspect of a single feature
ARRANGE –ACT –ASSERT
Independent featuresShort test path with lower chance to breakCause and impact of error easy to relate
97
Test automation pyramid
Userjourneys
Acceptance-criteria
Units
exploratory testing
Source: Mike Cohn
many
few
hard
easy
Automatability
98
// Go to web page 'http://localhost:40001/' using new browser instanceBrowserWindow localhostBrowser = BrowserWindow.Launch(
new System.Uri(this.RecordedMethod1Params.Url));
// Click 'Register found item' linkMouse.Click(uIFundstückerfassenHyperlink, new Point(56, 9));
// Click 'Save' buttonMouse.Click(uISpeichernButton, new Point(44, 14));
int fundNr1 = int.Parse(uIFundNr127Pane.InnerText.Substring(9));
// Click 'Register found item' linkMouse.Click(uIFundstückerfassenHyperlink, new Point(63, 7));
// Click 'Save' buttonMouse.Click(uISpeichernButton, new Point(34, 11));
int fundNr2 = int.Parse(uIFundNr128Pane.InnerText.Substring(9));
Assert.IsTrue(fundNr1 + 1 == fundNr2);
// Click 'Close' buttonMouse.Click(uICloseButton, new Point(26, 11));
Readability
99
A readable test case
Scenario: New found items should receive a consecutive number for the current year
Given the previous found item of thecurrent year had the number 145
When I register a new found item
Then the last found item of thecurrent year should have the number 146
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, …
def
inin
g th
e p
rod
uct
criticizing th
e p
rod
uct
New dimension: defining the productSynergy: Specification of requirements and tests
Agile Testing Quadrants: Brian Marick
101
Test automation pyramid
Userjourneys
Acceptance-criteria
Units
exploratory testing
Source: Mike Cohn
many
few
hard
easy
Automatability
102
Manual Testing is always necessary!
Userjourneys
Acceptance-criteria
Units
exploratory testing
Source: Mike Cohn
many
few
harder
easier
Automatability
ManualCheckafterStoryDone
Mainsuccesspathes
Undiscoveredacceptancecriteria
No/(few)manualregressionchecks
Few pathesare enough
More timefor exploration
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
Explo
ratory Tests
Specification and test
Collaboration for definingacceptance criteria
Collaboration for automation
Preventing bugsinstead of finding them!
Extension of“Test Cases”
LimitWIP
Collaborationin manual
testing
104
ATDD
105
Tasks are not “business readable”
Create bookings for a fixed time loop on
106
… scenarios (AC) are business readable
107
ATDD cycle
Write afailing
unit test
Make thetest pass
Refactor
Write a failingacceptance
test
Deploy andmeasureimpact
Refine feature, if needed(new user story)
break downunits
extendsystemUser Story
AC/Scenario 1
AC/Scenario 2
AC/Scenario …
AC/Scenario n
modifysystem
Expectedimpact
108
Transpareny for all stakeholders
In Progress
109
Report: all scenarios of the current sprint
110
First scenario started
111
First scenario finished
112
Visible progress: scenarios turning green
113
Visible progress: scenarios turning green
114
Visible progress: scenarios turning green
115
Work in progress on multiple stories
116
First story ready to test
117
Manual test can already start earlier
118
Scenarios can turn red again
119
Scenarios can turn red again
120
Valuable feedback
121
Resources
122
Books
Gojko AdzicBridiging theCommunication Gap@gojkoadzic
Gojko AdzicSpecification byExample@gojkoadzic
Elisabeth HendricksonExplore IT!@testobsessed
123
Books
50 Quick Ideasto improve your
User StoriesGojko AdzicDavid Evans@gojkoadzic
@DavidEvans66
User StoryMapping
Jeff Patton@jeffpatton
Impact MappingGojko Adzic
@gojkoadzic
124
Books
Discover to DeliverEllen Gottesdiener
Mary Gorman@ellengott
ComittmentChris Matts et al
@papachrismatts
126
Product Owner Survival CampAcross 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
TechTalk: put this into daily practice
• Agile Software Development• Consulting and Delivery• Offices: Zurich, Vienna, Budapest• Founded: 1993
TechTalk office, Vienna/Austria
129
Work with us …
Projects Experts
Agile Coaching
& Training
More information at http://www.techtalk.at/?lang=en-US