View
218
Download
1
Embed Size (px)
DESCRIPTION
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).
Citation preview
Effective User Stories
Andrew RuslingAgile Coach
@andrewrusling
2WARNING, 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).
3Contents
1. Why
2. What
3. INVEST
4. Getting to Done
5. Re-writing
6. Backlog health
7. Wrap up
4Competencies 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
5
Why
6Agile Software Development
Agile values and principles
• Business people working daily with the team
• Frequent deliveries of working software
• Frequent feedback
• Embrace change
7Agile Requirements
Agile needs an approach to requirements, that is:
• Lightweight
• Change friendly
• Collaborative
8
What
9User Stories
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
As a [PERSONA]
I want [GOAL]
So that [BUSINESS BENEFIT]
Title
In order to [BUSINESS BENEFIT]
As a [PERSONA]
I want [GOAL]
Title
10An example
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
Authorize loans
11The three C’s
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
12User Stories are NOT
• Items that get ‘approved’
• Detailed Requirements
• Use Cases
13
INVEST
14INVEST by Bill Wake
• Of order of user story delivery• Of internal and especially external dependenciesIndependent
• 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 languageEstimatable
• Easily fits into a Sprint. i.e. < 20% of velocity.• Definitely not > 33% of velocitySmall
• Can be automated• Avoid external testing / long test suitesTestable
15Compromises are necessary
Big stories are usually:
• Independent
• Negotiable
• Valuable
but not
• Estimable
• Testable
• Small.
They may also contain gold plating.
Non Negotiable stories are usually, Estimable & Testable
Splitting into Smaller stories, may reduce Value and increase dependencies (especially if split poorly).
16
Exercise
INVESTing
INVESTing in our Stories
As a top tier player of Towering InfernoI 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 InfernoI 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 InfernoI 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
INVESTing in our Stories
As a top tier player of Towering InfernoI 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 InfernoI 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 InfernoI 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’ duplicates the ‘I want’, is less concise then middle story.
‘So that’ explains the business value for the change
INVESTing in our Stories
As a fan of South ParkI want a mini game feels like ten pin bowling with the main charactersSo that I can have a laugh at some of their crazy antics, that are different to the main game.
As the project teamI 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 ParkI want a humorous South Park themed game, that includes a couple of difficult mini gamesSo that I can play a game that challenges and entertains me
INVESTing in our Stories
As a fan of South ParkI want a mini game feels like ten pin bowling with the main charactersSo that I can have a laugh at some of their crazy antics, that are different to the main game.
As the project teamI 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 ParkI want a humorous South Park themed game, that includes a couple of difficult mini gamesSo that I can play a game that challenges and entertains me
This is the smallest story
This is a HUGE story.
This is a BIG story.
INVESTing in our Stories
As a Towering Inferno Game ManagerI 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
As a Towering Inferno Game ManagerI want the weekly bonus amounts to be configured in WeeklyBonusAmounts table in the databaseSo that I can encourage our top tier players to keep playing
As a top tier player of Towering InfernoI want to receive a larger bonus than low tier players in the weekly drawSo that I feel I am valuable player, that the game values
INVESTing in our Stories
As a Towering Inferno Game ManagerI 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
As a Towering Inferno Game ManagerI want the weekly bonus amounts to be configured in WeeklyBonusAmounts table in the databaseSo that I can encourage our top tier players to keep playing
As a top tier player of Towering InfernoI want to receive a larger bonus than low tier players in the weekly drawSo that I feel I am valuable player, that the game values
Specifies implementation
No implementation details, has real business value
Not a good business value, everyone wants to be paid more.
INVESTing in our Stories
As the Product OwnerI want API documentation in the same format as Twitter API documentsSo that it is easy to get started with the Data Mangler service
As a Data AnalystI want API documentation for the Data Mangler serviceSo that it is easy to get started using it
As a Data AnalystI want API documentation in the same format as Twitter API documentsSo that it is easy to get started with the Data Mangler service
INVESTing in our Stories
As the Product OwnerI want API documentation in the same format as Twitter API documentsSo that it is easy to get started with the Data Mangler service
As a Data AnalystI want API documentation for the Data Mangler serviceSo that it is easy to get started using it
As a Data AnalystI want API documentation in the same format as Twitter API documentsSo that it is easy to get started with the Data Mangler service
Is Negotiable, appropriate user, with a clear business value
Too specific, it locks down choice / may miss out on better ideas
PO is usually the wrong user, they rarely get business benefit
25
Getting to Done
26Getting to Done
• From the User Story text has been satisfiedIntention
• All completedAcceptance Criteria
• All completed• Or accepted as Not Applicable
Definition of Done
• Product Owner has reviewed and accepted the story.Reviewed
27Acceptance Criteria vs. User Stories
User Story
• Intention• Negotiable• Open yet
concise
Acceptance Criteria
• Requirements• Once set non-
negotiable• Specific and
concise
28Acceptance 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.
29Acceptance Criteria an example
Acceptance Criteria• £ Limit will be hard coded in this
version.
• User must manually load the loan (no notification of loan awaiting approval)
30
Product Backlog
User Story
Context
Title
Story text
Acceptance Criteria
Notes
Definition of Done
PersonaPersonaPersona
Release Plan
Tests
Software
• • • •
31
Exercise
Story vs Acceptance Criteria
32Home 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.
33Identify User Story, Acceptance Criteria, Notes
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
34Resulting elements
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
35Result as User Story
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
36Identify User Story, Acceptance Criteria, Notes
‘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
37Resulting elements
‘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
User Benefit is not clearly represented
Business Benefit is to stop losing customers
38Result as User Story
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.
39
Exercise
Rewriting
40To 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
41One possible answer
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
42To 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
43One possible answer
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.
44To 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
45One possible answer
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
46To 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
47One possible answer
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
48
Backlog health
49A healthy backlog is
•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
50A healthy backlog
Waterline
• Ordered• Balanced• Diverse
51
Exercise
Backlog health
52Why is it unhealthy? What symptoms will occur?
• Not prioritised• Not ordered• Too many priority 1’s• No guidance from PO• Hard to plan sprints
53Why is it unhealthy? What symptoms will occur?
• 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
54Why is it unhealthy? What symptoms will occur?
• Not enough INVESTments• Hard to plan sprint• Waste time in planning grooming
stories (usually in a rush)
55Why is it unhealthy? What symptoms will occur?
• Not enough diversity • May not fit team capabilities• Hard to balance work in the sprint
56
Wrap Up
57Summary
58Competencies 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
Time to share
60Reference Material
How to write a useful User Story – article from Gov.uk
User Stories explained – article with examples in Agile Atlas