What are User Stories? How should we write them? How to write them well?
Effective User Stories allow your team to be effective (deliver want the User needs) and efficient (Deliver it quickly and importantly don't deliver unneeded features).
2. WARNING, WARNING, WARNING
Pre-reading these slides will
significantly damage the learning
opportunity for yourself.
This training material is designed to be delivered in a class
room situation, with activities and discussion.
If you intend to attend this training, please do not read past
the competencies slide (4).
2
3. Contents
1. Why
2. What
3. INVEST
4. Getting to Done
5. Re-writing
6. Backlog health
7. Wrap up
3
4. Competencies to be gained
At the end of this session I hope that you will be able to:
• Summarise why User Stories are used for Agile Software Development
• Describe the key elements of a User Story
• Write out one of two common templates for User Stories
• Summarise how User Story text and Acceptance Criteria differ
• List the three C's
• Compare user stories based on the strength of their INVEST properties
• List the four items that are necessary for a story to be Done
• Write User Stories based on a detailed request
• Re-write poor User Stories into Effective User Stories
• Identify a healthy backlog
• List several ways a backlog can become unhealthy
• Identify an unhealthy backlog
4
6. Agile Software Development
Agile values and principles
• Business people working daily with the team
• Frequent deliveries of working software
• Frequent feedback
• Embrace change
6
7. Agile Requirements
Agile needs an approach to requirements, that is:
• Lightweight
• Change friendly
• Collaborative
7
9. User Stories 9
Title
As a [PERSONA]
I want [GOAL]
So that [BUSINESS BENEFIT]
Title
Persona – Type of User, potentially described as an imaginary person.
Goal – Change / Functionality / Action, how we intend for the software to change.
Business Benefit – Either directly beneficial to the business, or
implied benefit to the business by impacting the behaviour of the Persona.
Re-enforcing elements
In order to [BUSINESS BENEFIT]
As a [PERSONA]
I want [GOAL]
10. An example 10
Authorize loans
As a Bank Branch Manager
I want to be able to authorize loans to a higher
financial limit than Bank Tellers
So that I can minimize financial risk and allow
for high value loans at the same time
11. The three C’s 11
Card
• Promise for a conversation
• Token (Visual, Tangible)
• Story on front
• Acceptance Criteria on back
Conversation
• PO and Team
• With customer
• Elaborate details
Confirmation
• PO verification
• Automated tests
12. User Stories are NOT
• Items that get ‘approved’
• Detailed Requirements
• Use Cases
12
14. INVEST by Bill Wake
• Of order of user story delivery
• Of internal and especially external dependencies Independent
• Flexible scope
• None specific language
• Explain the intention, not the implementation
Negotiable
• Value is clear to everyone
• Persona matches Benefit & Goal will deliver the benefit.
• Avoid technical / role specific language
Valuable
• Clear and concise explanation
• Avoid technical / role specific language Estimatable
• Easily fits into a Sprint. i.e. < 20% of velocity.
• Definitely not > 33% of velocity Small
• Can be automated
• Avoid external testing / long test suites Testable
14
15. Compromises are necessary
Big stories are usually:
• Independent
• Negotiable
• Valuable
but not
• Estimable
• Testable
• Small.
They may also contain gold
plating.
15
Non Negotiable stories are
usually, Estimable & Testable
Splitting into Smaller stories,
may reduce Value and
increase dependencies
(especially if split poorly).
17. INVESTing in our Stories
As a top tier player of Towering Inferno
I might need a total score in excess of the current limit of 9999. I would like
this limit raising to one million
So that I can obtain a huge total score.
As a top tier player of Towering Inferno
I would like the total score limit raised from 9999 to 1 million
So that I can obtain a huge total score.
As a top tier player of Towering Inferno
I would like the total score limit raised to one million
So that the artificial limit of 9999 does not hinder my enjoyment of the
game
18. INVESTing in our Stories
As a top tier player of Towering Inferno
I might need a total score in excess of the current limit of 9999. I would like
this limit raising to one million
So that I can obtain a huge total score.
‘So that’ duplicates the ‘I want’, is less concise then middle story.
As a top tier player of Towering Inferno
I would like the total score limit raised from 9999 to 1 million
So that I can obtain a huge total score.
As a top tier player of Towering Inferno
I would like the total score limit raised to one million
So that the artificial limit of 9999 does not hinder my enjoyment of the
game
‘So that’ explains the business value for the change
19. INVESTing in our Stories
As a fan of South Park
I want a humorous South Park themed game, that includes a couple of
difficult mini games
So that I can play a game that challenges and entertains me
As the project team
I want a prototype with 1st cut art of a humorous South Park game (no mini
games needed)
So that we can determine if the project is worth proceeding with
As a fan of South Park
I want a mini game feels like ten pin bowling with the main characters
So that I can have a laugh at some of their crazy antics, that are different to
the main game.
20. INVESTing in our Stories
As a fan of South Park
I want a humorous South Park themed game, that includes a couple of
difficult mini games
So that I can play a game that challenges and entertains me
This is a HUGE story.
As the project team
I want a prototype with 1st cut art of a humorous South Park game (no mini
games needed)
So that we can determine if the project is worth proceeding with
This is the smallest story
As a fan of South Park
I want a mini game feels like ten pin bowling with the main characters
So that I can have a laugh at some of their crazy antics, that are different to
the main game.
This is a BIG story.
21. INVESTing in our Stories
As a top tier player of Towering Inferno
I want to receive a larger bonus than low tier players in the weekly draw
So that I feel I am valuable player, that the game values
As a Towering Inferno Game Manager
I want the weekly bonus amounts to be configured in
WeeklyBonusAmounts table in the database
So that I can encourage our top tier players to keep playing
As a Towering Inferno Game Manager
I want to be able to set bonus amounts by player tier in the weekly draw
So that I can encourage our top tier players to keep playing
22. INVESTing in our Stories
As a top tier player of Towering Inferno
I want to receive a larger bonus than low tier players in the weekly draw
So that I feel I am valuable player, that the game values
Not a good business value, everyone wants to be paid more.
As a Towering Inferno Game Manager
I want the weekly bonus amounts to be configured in
WeeklyBonusAmounts table in the database
So that I can encourage our top tier players to keep playing
Specifies implementation
As a Towering Inferno Game Manager
I want to be able to set bonus amounts by player tier in the weekly draw
So that I can encourage our top tier players to keep playing
No implementation details, has real business value
23. INVESTing in our Stories
As a Data Analyst
I want API documentation in the same format as Twitter API documents
So that it is easy to get started with the Data Mangler service
As a Data Analyst
I want API documentation for the Data Mangler service
So that it is easy to get started using it
As the Product Owner
I want API documentation in the same format as Twitter API documents
So that it is easy to get started with the Data Mangler service
24. INVESTing in our Stories
As a Data Analyst
I want API documentation in the same format as Twitter API documents
So that it is easy to get started with the Data Mangler service
Too specific, it locks down choice / may miss out on better ideas
As a Data Analyst
I want API documentation for the Data Mangler service
So that it is easy to get started using it
Is Negotiable, appropriate user, with a clear business value
As the Product Owner
I want API documentation in the same format as Twitter API documents
So that it is easy to get started with the Data Mangler service
PO is usually the wrong user, they rarely get business benefit
26. Getting to Done 26
• From the User Story text has been
satisfied Intention
• All completed
Acceptance
Criteria
• All completed
• Or accepted as Not Applicable
Definition of
Done
• Product Owner has reviewed and
accepted the story. Reviewed
27. Acceptance Criteria vs. User Stories
User Story
• Intention
• Negotiable
• Open yet
concise
Acceptance
Criteria
• Requirements
• Once set non-negotiable
• Specific and
concise
27
28. Acceptance Criteria
• Explain Product Owner expectations
• Can clarify scope (either in or out)
• Can clarify assumptions
• Can detail implementation (but only when critical)
• Written on the back of the index card.
• Can be detailed, but should not be a specification.
• Added/Change over time (including within the Sprint)
• Not mandatory, but often used.
28
29. Acceptance Criteria an example 29
Acceptance Criteria
• £ Limit will be hard coded in this version.
• User must manually load the loan (no
notification of loan awaiting approval)
30. Context 30
Product Backlog
User Story
Title
Story text
Acceptance
Criteria
Notes
Definition of
Done
Software
Persona
Persona
Persona
Release Plan
Tests
•
•
•
•
32. Home Chef
My Supermarket is an existing web site that allows shoppers to fill a
grocery basket then shop around between supermarkets to get the best
deal before arranging the shopping to be delivered.
HomeChef is our application, that we are building. It already allows our
users to quickly generate shopping lists from their favourite recipes.
32
33. Identify User Story, Acceptance Criteria, Notes
33
We are going to integrate HomeChef to MySupermarket, allowing our
users to quickly order the groceries they need to cook a weeks worth of
their favourite recipes. This should be a seamless process, that is
resistant to errors and network drop outs. Our user research shows ours
will not wait for longer than 15 seconds for any action in our application.
Once the user has selected several recipes, there should be an easy to
see and use option to send their combined shopping list to their My
Supermarket account. It would be nice if there was some indication that
the transfer is processing, while the user waits.
Investigations have shown that configuring a My Supermarket account in
our software will be difficult. A hard coded configuration exists that you
can use.
We expect that it is our most thrifty home cooks that will use this feature.
Other users may not view the extra step worth it for the cost saving it
provides.
User Story Acceptance Criteria Notes
34. Resulting elements
34
We are going to integrate HomeChef to MySupermarket, allowing our
users to quickly order the groceries they need to cook a weeks worth of
their favourite recipes. This should be a seamless process, that is
resistant to errors and network drop outs. Our user research shows ours
will not wait for longer than 15 seconds for any action in our application.
Once the user has selected several recipes, there should be an easy to
see and use option to send their combined shopping list to their My
Supermarket account. It would be nice if there was some indication that
the transfer is processing, while the user waits.
Investigations have shown that configuring a My Supermarket account in
our software will be difficult. A hard coded configuration exists that you
can use.
We expect that it is our most thrifty home cooks that will use this feature.
Other users may not view the extra step worth it for the cost saving it
provides.
User Story Acceptance Criteria Notes
35. Result as User Story 35
Integrate HomeChef to MySupermarket
As a thrifty home cook
I want to easily be able to send my
shopping list to my MySupermarket
account
So that I can save money and time on my
weekly shopping
Acceptance Criteria
• Must be resistant to errors and network
drop outs
• Do not have to configure the account
details, that will be a different story
Notes
• A transferring animation is a nice to have
36. Identify User Story, Acceptance Criteria, Notes
36
‘Daily Journal’ needs to add photo support to the website version. We are
losing younger people to our competitor ‘PhotoJournal’ and have to stop
this. It is crucial that we support a wide variety of image types so that we
don’t exclude many users. So jpg, jpeg, png, etc must be accepted. With
the current database issues we need to limit the upload size so that we
avoid further outages. Analysis is ongoing regarding which image types
are most used and information will be forth coming. This feature can not
damage our reputation as the fastest journaling app on the market. We
are going to launch a media campaign next month: ‘Daily Journal the
fastest journal app, now includes photos with five amazing filters. It is
your one-stop journaling app.’
User Story Acceptance Criteria Notes
37. Resulting elements
37
‘Daily Journal’ needs to add photo support to the website version. We are
losing younger people to our competitor ‘PhotoJournal’ and have to stop
this. It is crucial that we support a wide variety of image types so that we
don’t exclude many users. So jpg, jpeg, png, etc must be accepted. With
the current database issues we need to limit the upload size so that we
avoid further outages. Analysis is ongoing regarding which image types
are most used and information will be forth coming. This feature can not
damage our reputation as the fastest journaling app on the market. We
are going to launch a media campaign next month: ‘Daily Journal the
fastest journal app, now includes photos with five amazing filters. It is
your one-stop journaling app.’
User Benefit is not clearly represented
Business Benefit is to stop losing customers
User Story Acceptance Criteria Notes
38. Result as User Story 38
Add photos with filters to website
As a young journal writer
I want to include fun looking photos with
my journal entries
So that my entries are more engaging and
memorable
Acceptance Criteria
• Supports photo types ???
• Photo size limited to ???
• Performance must remain fastest on the market.
• At least five filters must be implemented.
Notes
• Due prior to end of next month, to align with
media campaign.
40. To rewrite
Ensure that every team member has enough knowledge to deploy the
services and run the tests
Needs to be a shared document on how to do this to support team and
inform new members
40
41. One possible answer 41
Team able to deploy and test services
As a development team members
I want to know how to deploy and test the
CRH services
So that I can gain fast feedback, without
interrupting busy team members
Acceptance Criteria
• NONE (Definition of Done already covers off the
requirement to test things)
Notes
• NONE
42. To rewrite
Onboard Mary Evans Data
535K lines
tilde separated
field with SME / Collection owner - not consistent grouping in this field
Business value is to count 200+ collection owners 3 times
Pre process, parse
Store audit log persistently
42
43. One possible answer 43
Onboard mary evans data
In order to score highly on our SME engagement
metric
As the Digital Catapult
I want to upload the data from Mary Evans in
batches that maximise the number of batches
each SME has some data
Acceptance Criteria
• NONE
Notes
• SME’s need to appear in three batches to count
as engaged.
44. To rewrite
Implement Hub Control Service
Ping all services in domain every xSecs as health check
PostGres as store (can be log too)
API to inform of status
1 for registration of service
1 get address of one of registered service
1 to receive info about service
Clean-up service
44
45. One possible answer 45
Hub control service
As a hub repository owner
I want the ability to actively monitor and to
programmatically check the health of my hub repository
So that I can offer a good level of service to my
customers
Notes
• Ping all services in domain every xSecs as
health check
• PostGres as store (can be log too)
• API to inform of status
• 1 for registration of service
• 1 get address of one of registered service
• 1 to receive info about service
• Clean-up service
46. To rewrite
Clean and well tested deployment instructions
Business value - lowered rework, lowered risk to reputation
Chef cookbooks working
Need a catalogue of these one click services
For Beta users to set up their own services
46
47. One possible answer 47
Deployment Instructions
In order to save time deploying the CRH
As a beta user
I want clean easy to follow deployment
instructions
Acceptance Criteria
• Chef cookbooks working
• Need a catalogue of these one click services
Notes
• NONE
49. A healthy backlog is 49
• Prioritised by PO for ROI
• Ordered by team for dependencies, etc. Ordered
• Top contains 1.5 to 2 sprints of INVESTments
• Next comes Chunks
• Followed by Epics
Balanced
• A mixture of work that roughly matches team
capability
• Considering cross skilling / up skilling may be
a better investment in the long term
Diverse
52. Why is it unhealthy? What symptoms will occur? 52
• Not prioritised
• Not ordered
• Too many priority 1’s
• No guidance from PO
• Hard to plan sprints
53. Why is it unhealthy? What symptoms will occur? 53
• All INVESTments
• Hard to see the big picture
• Extra effort to maintain the backlog
• Lots of grooming effort will be
wasted
• Lots of stories will be thrown away
54. Why is it unhealthy? What symptoms will occur? 54
• Not enough INVESTments
• Hard to plan sprint
• Waste time in planning grooming
stories (usually in a rush)
55. Why is it unhealthy? What symptoms will occur? 55
• Not enough diversity
• May not fit team capabilities
• Hard to balance work in the sprint
58. Competencies to be gained
I hope that you are now able to:
• Summarise why User Stories are used for Agile Software Development
• Describe the key elements of a User Story
• Write out one of two common templates for User Stories
• Summarise how User Story text and Acceptance Criteria differ
• List the three C's
• Compare user stories based on the strength of their INVEST properties
• List the four items that are necessary for a story to be Done
• Write User Stories based on a detailed request
• Re-write poor User Stories into Effective User Stories
• Identify a healthy backlog
• List several ways a backlog can become unhealthy
• Identify an unhealthy backlog
58
Give attendees 2 minutes to decide on the best and worst examples. Importantly they should also explain WHY is it good or bad.
Notes for all of these exercises:
We are being picky during these exercises (language both written and read, comprehension of the written word, personal preference for writing style and amount of detail)
It is the concepts that are key! i.e. What questions to ask yourself when writing/reading these stories.
Context is missing, which makes it hard
Avoid using Product Owner as the User. The key reason being that the ‘Product Owner’ as a user cuts out the chance for the team to challenge the business benefit. It usually indicates that we don’t really understand what the benefit is, hence why should we do this story. Other reason is that the PO never gets business benefit, either the User or Company gets benefit. So with the PO as user we can not link the ‘as a’ line to the ‘so that’ line.