Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
CHRISTIAN HASSA (CH@TECHTALK.AT), @CHRISHASSA
MANAGING PARTNER
February 2015
Agile Requirements
From Impacts to Specificat...
4
Agile
“Requirements”
5
Why agile requirements?
Successful problem solving requires
finding the right solution
to the right problem.
Russell Ack...
6
What makes user stories “agile”?
• Describe user needs or features
• Unit of planning/prioritization
Help solving the ri...
7
People fear uncertainty:
They rather make a decision now
and run the risk of being wrong,
than continue in a state of
un...
8
Agile Requirements
Image from: 50 Quick ideas to improve your user stories: https://leanpub.com/50quickideas
@gojkoadzic...
9
Project Success
10
Agile Requirements
Impact
Mapping
Image from: 50 Quick ideas to improve your user stories: https://leanpub.com/50quicki...
11
Our job is NOT
to 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 colla...
16
Impact Maps
Goal
Actors
Impacts
Deliverables
Increase peak sales
Mobile User
Buy more
online
Mobile
Website
17
Evaluate Options
Goal
Actors
Impacts
Deliverables
Increase peak sales
One-Click
purchase
Mobile User Call Center
Buy mo...
18
Hierarchical goals
Goal
Actors
Impacts
Deliverables
Increase turnover 3%
Increase
block buster
market share
Increase pe...
19
Sphere of influence
Zone of control
Influence vs. Control
Goal
Actors
Impacts
Deliverables
Increase turnover 3%
Increas...
20
Feedback and
Product Design
21
Agile Requirements
Story
Mapping
Image from: 50 Quick ideas to improve your user stories: https://leanpub.com/50quickid...
22
Give 2% of users
a 100% of what they need,
not 100% of people
only 2% of their needs.
- Gojko Adzic (@gojkoadzic)
23
Story Maps
• Design for particular
stakeholder impacts
• Slice and refine
deliverables (releases)
• Support backlog
man...
24
Zone of control
Sphere of influence
Product Backlog:
Zone of control
User Journey: Sphere of influence
Structure
Discov...
25
Structure
Hears about
concert
Tries to get
tickets
Waits for
concert
Attends
concert
Upcoming
ticket sales
Additional
a...
26
Prioritize per user activity
Hears about
concert
Tries to get
tickets
Waits for
concert
Attends
concert
Upcoming
ticket...
27
Walking
Skeleton
Prioritize slices
Upcoming
ticket sales
Additional
artist info
Pay by
credit card
Pay by
invoice
Print...
28
Prioritize for deliverable
Visits site
more often
Blockbuster
concert info
Hears about
concert
Tries to get
tickets
Wai...
29
Prioritize for deliverable
Visits site
more often
Blockbuster
concert info
Hears about
concert
Tries to get
tickets
Wai...
30
Validate impact
Visits site
more often
Blockbuster
concert info
Hears about
concert
Tries to get
tickets
Waits for
conc...
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 Voter
Fund-
management
More
candidates
run for
election
More voters
participate in
election
Less effort
appro...
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
Sprint 1
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...
43
Sprint 2
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...
44
Sprint 3
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...
45
Dropped user stories
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...
46
Added user stories
83
76 89
58
78
59
60
61
63
8082
55
54
56
90
52
48
48.2
48.1
49
50
91
77
46
44
42
41
36 34 39
38 32
2...
47
Sprint 4
83
76 89
58
78
59
60
61
63
8082
55
54
56
90
52
48
48.2
48.1
49
50
91
77
46
44
42
41
36 34 39
38 32
28
29
25
21...
48
Flexible scope
83
76 89
58
78
59
60
61
63
8082
55
54
56
90
52
48
48.2
48.1
49
50
91
77
46
44
42
41
36 34 39
38 32
28
29...
49
Candidate Voter
Fund-
management
More
candidates
run for
election
More voters
participate in
election
Less effort
appro...
50
Specifications
51
Agile Requirements
Specification-
By-Example
Image from: 50 Quick ideas to improve your user stories: https://leanpub.c...
52
Agile Specifications
Why?
Impact
How?
Specification earlier later
Code
Reminder
for a
conversation
Goals
Impacts
Epics
...
53
Specification Workshops
public void TestInitialOrderDiscount()
{
Customer newCustomer = new Customer();
Order newOrder ...
54
Acceptance-
criteria
Why?
Impact
How?
Specification earlier later
Code
Goals
Impacts
Epics
User Stories
Bugs
Agile Spec...
55
Specification-By-Example
Examples …
…make abstract descriptions better understandable
…are usually not formally documen...
56
Specification Workshops
public void TestInitialOrderDiscount()
{
Customer newCustomer = new Customer();
Order newOrder ...
57
… illustrated with formalized examples
Given the user has not ordered yet
When the user adds a book with the price of E...
58
Discover hidden assumptions
Actually, this is not quite right:
Books on sale should be excluded.
Original idea for the ...
59
Collaboration: 3 amigos
“Happy
Path”
Technical
feasability
Exceptions,
border cases
Original idea for the illustration:...
60
Structuring
the conversation
61
Collecting Acceptance Criteria
“I would try to put a book into the
shopping cart …”
“I would try to remove a book
from ...
62
Exploration through examples
Books in catalogue:
Title Author
Specification-By-Example Gojko Adzic
Impact Mapping Gojko...
63
Key examples: Breaking the model
Books in catalogue:
Title Author
Specification-By-Example Gojko Adzic
Impact Mapping G...
64
UI wire frames,
existing UI
rules, key examples
existing artifacts,
samples
Different kinds of examples
65
Abstract acceptance criteria
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase mul...
66
Scenarios: Examples in Gherkin
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase m...
67
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books ca...
68
The same book can be added multiple times to the shopping basket
Structure of Scenarios
Given my shopping basket contai...
69
Purpose of the examples
• Shared understanding:
acceptance criteria
• Documentation:
specification details
• Regression...
70
Automated continuous validation
Given my shopping basket contains 1 copy of “Harry Potter”
When I add the book “Harry P...
71
Different levels of automation
72
SpecFlow in 2014 – BDD for .NET
#82inVisual StudioGallery based on popularity (6.11.2014)
#26in NuGet based on recent i...
73
Specification
Examples
74
Booking system
75
Payroll calculation
76
eVoting system
77
Examples in Excel
78
End-End
ALM Tool
support
79
Development Platform (Java, .NET, Ruby, PHP)
Version Control System (Git, TFS-VC)
Workitem Tracking (JIRA, TFS)
SpecLog...
80
Story Maps in SpecLog
Story Maps
User activities
Priority
81
Product Backlog in Workitems
Product
Backlog
82
Acceptance Criteria in SpecLog
Sprint
Backlog
83
Acceptance Criteria in Workitems
Sprint
Backlog
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
Living
Documen-
tation
88
Living documentation in SpecLog
Drill into Details
(Gherkin scenarios)
Overview
(Story Map)
89
Living documentation in HTML
Living
Documen-
tation
90
Living documentation: Validation
91
Version Control System (Git, TFS-VC)
Workitem Tracking (JIRA, TFS)
SpecLog
Story Maps
Product
Backlog
Sprint
Backlog
Ta...
92
Living
documentation
93
Evolving Specifications
Product/Sprint Backlog
User Story 1
AccCrit 1
AccCrit 2
User Story 2
AccCrit 3
AccCrit 4
Living...
94
Impact on
testing
95
Test automation becomes expensive
when …
• trying to automate
manual tests
• making tests
unreadable when
automating th...
96
Structure
Manual tests
Asserts Multiple combined
features
Structure ACT-ASSERT-
ACT-ASSERT-
ACT-ASSERT-
…
Dependent fea...
97
Test automation pyramid
User
journeys
Acceptance-
criteria
Units
exploratory
testing
Source: Mike Cohn
many
few
hard
ea...
98
// Go to web page 'http://localhost:40001/' using new browser instance
BrowserWindow localhostBrowser = BrowserWindow.L...
99
A readable test case
Scenario: New found items should receive a
consecutive number for the current year
Given the previ...
100
When to test (point in time)
Acceptance criteria
(ATDD, BDD)
Unit Tests
(TDD)
business view
technical view
Exploratory...
101
Test automation pyramid
User
journeys
Acceptance-
criteria
Units
exploratory
testing
Source: Mike Cohn
many
few
hard
e...
102
Manual Testing is always necessary!
User
journeys
Acceptance-
criteria
Units
exploratory
testing
Source: Mike Cohn
man...
103
Cross-functional work
Sprint 1 Sprint 2 Sprint 3
short iteration
US4
Plan
Implement &
autom. test
US5
Plan
Implement &...
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 a
failing
unit test
Make the
test pass
Refactor
Write a failing
acceptance
test
Deploy and
measure
im...
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 Adzic
Bridiging the
Communication Gap
@gojkoadzic
Gojko Adzic
Specification by
Example
@gojkoadzic
Elisabe...
123
Books
50 Quick Ideas
to improve your
User Stories
Gojko Adzic
David Evans
@gojkoadzic
@DavidEvans66
User Story
Mapping...
124
Books
Discover to Deliver
Ellen Gottesdiener
Mary Gorman
@ellengott
Comittment
Chris Matts et al
@papachrismatts
126
Product Owner Survival Camp
Across Europe
With: Gojko Adzic, David Evans, Chris Matts,
Christian Hassa
Special Guests:...
TechTalk: put this into daily practice
• Agile Software Development
• Consulting and Delivery
• Offices: Zurich, Vienna, B...
129
Work with us …
Projects Experts
Agile
Coaching
&
Training
More information at http://www.techtalk.at/?lang=en-US
Upcoming SlideShare
Loading in …5
×

Agile Requirements

5,051 views

Published on

From Impacts to Specifications

This is a compilation of several of my presentations for working with agile requirements on different goal levels, and how impact mapping, story mapping and specification-by-example work together.

Published in: Technology

Agile Requirements

  1. 1. CHRISTIAN HASSA (CH@TECHTALK.AT), @CHRISHASSA MANAGING PARTNER February 2015 Agile Requirements From Impacts to Specifications
  2. 2. 4 Agile “Requirements”
  3. 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. 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. 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. 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)
  7. 7. 9 Project Success
  8. 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. 9. 11 Our job is NOT to develop software, our job is to change the world. - Jeff Patton (@jeffpatton)
  10. 10. 12 As a Sales Manager I want a …-report to monitor inventory
  11. 11. 13 As a Sales Manager I want a …-report to monitor inventory
  12. 12. 14 As a Sales Manager I want a …-report to monitor inventory faster
  13. 13. 15 Impact Mapping From: Gojko Adzic: www.impactmapping.org (@gojkoadzic) “Impact Mapping helps us plan better! It is collaborative, visual and fast.”
  14. 14. 16 Impact Maps Goal Actors Impacts Deliverables Increase peak sales Mobile User Buy more online Mobile Website
  15. 15. 17 Evaluate Options Goal Actors Impacts Deliverables 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
  16. 16. 18 Hierarchical goals 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
  17. 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
  18. 18. 20 Feedback and Product Design
  19. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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
  29. 29. 31 Slice User Stories Milestone 1 Milestone 3 Milestone 4
  30. 30. 32 Slice Releases Milestone 1 Milestone 2 Milestone 3 Milestone 4
  31. 31. 33 Tools
  32. 32. 34 Creation of Story Maps
  33. 33. 35 Trace from outputs to inputs Outputs: • Approved list of candidates • Published profiles of candidates • Election result
  34. 34. 36 Transport and Conservation
  35. 35. 37 Product Design with Story Maps
  36. 36. 38 Visual collaboration
  37. 37. 39 Case Study
  38. 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. 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
  40. 40. 42 Sprint 1 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 Nominate candidates Vote and determine results
  41. 41. 43 Sprint 2 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 Nominate candidates Vote and determine results
  42. 42. 44 Sprint 3 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 Nominate candidates Vote and determine results
  43. 43. 45 Dropped user stories 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 Nominate candidates Vote and determine results
  44. 44. 46 Added user stories 83 76 89 58 78 59 60 61 63 8082 55 54 56 90 52 48 48.2 48.1 49 50 91 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 Nominate candidates Vote and determine results
  45. 45. 47 Sprint 4 83 76 89 58 78 59 60 61 63 8082 55 54 56 90 52 48 48.2 48.1 49 50 91 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 Nominate candidates Vote and determine results
  46. 46. 48 Flexible scope 83 76 89 58 78 59 60 61 63 8082 55 54 56 90 52 48 48.2 48.1 49 50 91 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 Nominate candidates Vote and determine results
  47. 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?
  48. 48. 50 Specifications
  49. 49. 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)
  50. 50. 52 Agile Specifications Why? Impact How? Specification earlier later Code Reminder for a conversation Goals Impacts Epics User Stories Acceptance- criteria
  51. 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
  52. 52. 54 Acceptance- criteria Why? Impact How? Specification earlier later Code Goals Impacts Epics User Stories Bugs Agile Specifications
  53. 53. 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
  54. 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. 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. 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
  57. 57. 59 Collaboration: 3 amigos “Happy Path” Technical feasability Exceptions, border cases Original idea for the illustration: George Dinwiddie (@gdinwiddie) http://blog.gdinwidiee.com
  58. 58. 60 Structuring the conversation
  59. 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. 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. 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?
  62. 62. 64 UI wire frames, existing UI rules, key examples existing artifacts, samples Different kinds of examples
  63. 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. 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. 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. 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. 67. 69 Purpose of the examples • Shared understanding: acceptance criteria • Documentation: specification details • Regression-tests: violated specifications
  68. 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.
  69. 69. 71 Different levels of automation
  70. 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
  71. 71. 73 Specification Examples
  72. 72. 74 Booking system
  73. 73. 75 Payroll calculation
  74. 74. 76 eVoting system
  75. 75. 77 Examples in Excel
  76. 76. 78 End-End ALM Tool support
  77. 77. 79 Development Platform (Java, .NET, Ruby, PHP) Version Control System (Git, TFS-VC) Workitem Tracking (JIRA, TFS) SpecLog Story Maps Product Backlog Sprint Backlog Task Board Gherkin Scenarios Test- auto- mation Product Living Documen- tation Development Platform (Java, .NET, Ruby, PHP)
  78. 78. 80 Story Maps in SpecLog Story Maps User activities Priority
  79. 79. 81 Product Backlog in Workitems Product Backlog
  80. 80. 82 Acceptance Criteria in SpecLog Sprint Backlog
  81. 81. 83 Acceptance Criteria in Workitems Sprint Backlog
  82. 82. 84 Tasks in Workitems Task Board
  83. 83. 85 Version Controlled Scenarios SpecFlow Scenarios
  84. 84. 86 Scenarios tested with each Build Test- auto- mation
  85. 85. 87 Scenarios linked in SpecLog Living Documen- tation
  86. 86. 88 Living documentation in SpecLog Drill into Details (Gherkin scenarios) Overview (Story Map)
  87. 87. 89 Living documentation in HTML Living Documen- tation
  88. 88. 90 Living documentation: Validation
  89. 89. 91 Version Control System (Git, TFS-VC) Workitem Tracking (JIRA, TFS) SpecLog Story Maps Product Backlog Sprint Backlog Task Board Gherkin Scenarios Test- auto- mation Product Living Documen- tation Development Platform (Java, .NET, Ruby, PHP)
  90. 90. 92 Living documentation
  91. 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
  92. 92. 94 Impact on testing
  93. 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. 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
  95. 95. 97 Test automation pyramid User journeys Acceptance- criteria Units exploratory testing Source: Mike Cohn many few hard easy Automatability
  96. 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. 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. 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
  99. 99. 101 Test automation pyramid User journeys Acceptance- criteria Units exploratory testing Source: Mike Cohn many few hard easy Automatability
  100. 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. 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
  102. 102. 104 ATDD
  103. 103. 105 Tasks are not “business readable” Create bookings for a fixed time loop on
  104. 104. 106 … scenarios (AC) are business readable
  105. 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
  106. 106. 108 Transpareny for all stakeholders In Progress
  107. 107. 109 Report: all scenarios of the current sprint
  108. 108. 110 First scenario started
  109. 109. 111 First scenario finished
  110. 110. 112 Visible progress: scenarios turning green
  111. 111. 113 Visible progress: scenarios turning green
  112. 112. 114 Visible progress: scenarios turning green
  113. 113. 115 Work in progress on multiple stories
  114. 114. 116 First story ready to test
  115. 115. 117 Manual test can already start earlier
  116. 116. 118 Scenarios can turn red again
  117. 117. 119 Scenarios can turn red again
  118. 118. 120 Valuable feedback
  119. 119. 121 Resources
  120. 120. 122 Books Gojko Adzic Bridiging the Communication Gap @gojkoadzic Gojko Adzic Specification by Example @gojkoadzic Elisabeth Hendrickson Explore IT! @testobsessed
  121. 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
  122. 122. 124 Books Discover to Deliver Ellen Gottesdiener Mary Gorman @ellengott Comittment Chris Matts et al @papachrismatts
  123. 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. 124. TechTalk: put this into daily practice • Agile Software Development • Consulting and Delivery • Offices: Zurich, Vienna, Budapest • Founded: 1993 TechTalk office, Vienna/Austria
  125. 125. 129 Work with us … Projects Experts Agile Coaching & Training More information at http://www.techtalk.at/?lang=en-US

×