- Created by Quesnel, Angelique (Unlicensed), last modified on Jun 26, 2021
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 6 Next »
Tap on > to expand or collapse to view section content.
A user story represents a small piece of business value that a team can deliver in a sprint iteration. While traditional requirements (like use cases) try to be as detailed as possible, a user story is defined incrementally, in three stages:
The brief description of the need
The conversations that happen during backlog refinement and sprint planning to solidify the details
The tests that confirm the story's satisfactory completion
Keep yourself expressing business value
Avoid introducing detail too early that would prevent design options and inappropriately lock developers into one solution
Avoid the appearance of false completeness and clarity
Get to small enough chunks that invite negotiation and movement in the backlog
Leave the technical functions to the architect, developers, testers, and so on
When getting started with stories, a template can help ensure that you don't inadvertently start writing technical tasks:
As a <specific user (who)> I want to <do a thing (what)> so that <business value (why)>.
Examples:
As a consumer, I want shopping cart functionality to easily purchase items online.
As an executive, I want to generate a report to understand which departments need to improve their productivity.
Try to avoid the generic role of User when writing user stories. User stories are about all of the role who interact with the system or who realize some value or benefit from the system. Not all actors are end users. For example, a role could be another system or someone who wants certain functionality in order to buy your product but will never actually use the product. It may be useful to create aggregate roles (such as consumer) and specialized roles (such as browser or retail clerk).
A story should be small enough that it can be completed per the product Definition of Done within a sprint —ideally just a day. When a story is too large, it is called an epic. Backlog items tend to start as epics when they are lower priority. For release planning, epics should be broken down into smaller chunks, but not so small that you have moved into detailed design.
Working from a prioritized backlog of small user stories allows a team to get value and high-quality feedback on frequent intervals. Many teams struggle to split large user stories into small stories in a useful way. Instead of ending up with small vertical slices through their architecture, they get stories that look more like tasks or architectural components and fail to experience the value or feedback small stories should provide.
Fortunately, story splitting is a skill that can be learned in a relatively short time. Teams can go from struggling to fluently splitting stories with just a couple hours of practice and some simple tools. To help you learn story splitting,
Patterns for Splitting User Stories is my original article that outlines 9 kinds of functional complexity in large stories and approaches to split through each one. It has a cheat sheet of example stories for each pattern.
My How to Split a User Story poster walks through the questions Richard Lawrence uses when coaching a team to split their own stories.
Too broad
A team member can view iteration status.
Too detailed
A team member can view a table of stories with rank, name, size, package, owner, and status.
A team member can click a red button to expand the table to include detail, which lists all the tasks, with rank, name, estimate, owner, status.
Just right
A team member can view the iteration's stories and their status with main fields.
A team member can view the current burndown chart on the status page, and can click it for a larger view.
A team member can view or hide the tasks under the stories.
A team member can edit a task from the iteration status page.
Acceptance criteria provide the Definition of Done for the story. As details about the story evolve, capture the critical ones as acceptance criteria. The product owner should list as many acceptance criteria as possible in order to clarify the intent of the story. Regardless of how detailed the acceptance criteria are, the team should have a conversation about them and adjust the acceptance criteria to capture the results of the discussion. Once an iteration has begun, testers can formalize acceptance criteria into acceptance tests.
In the Story card, place the acceptance criteria directly beneath the value statement in the Description field. Delivery team members have a single location to see all of the story info with this method. By using bullet points, you can keep each criteria item brief and clear.
Creation: The customer, customer proxy, product owner, and anyone else who identifies a need for the product can contribute user stories.
Ownership and maintenance: The product owner owns the user stories and is responsible for writing, gathering, maintaining, and prioritizing.
Usage: Developers, testers, technical writers use user stories to be able to know what to implement and when they are done. Product owners track overall progress based on the status of the user stories. Management tends to track user stories rolled up to epics or features.
Too formal or too much detail. Product owners with good intentions often try to write extremely detailed user stories. If a team sees a story at iteration planning that looks like an IEEE requirements document, they often assume that all the details are there and will skip the detailed conversation.
Technical tasks masquerading as stories. Much of the power of Agile comes from having a working increment of software at the end of each iteration. If your stories are really just technical tasks, you often do not end up with working software at the end of each iteration, and you lose flexibility in prioritization.
Skipping the conversation. Stories are intentionally vague before iteration planning. If you skip the acceptance criteria conversation, you risk moving in the wrong direction, missing edge cases or overlooking customer needs.
So how can we make sure that user stories are completed correctly and comply with a client’s needs? This is where acceptance criteria come into play. Acceptance criteria are a formalized list of requirements that ensure that all user stories are completed and all scenarios are taken into account. Put simply, acceptance criteria specify conditions under which a user story is fulfilled. Concisely written criteria help development teams avoid ambiguity about a client’s needs and prevent miscommunication.
Writing acceptance criteria is not only important for eliciting the vision of a product from your client, but for the development process as well. It’s natural that different people see the same problem from different angles. Clearly written criteria introduce a single solution to the functionality you intend to implement.
To define boundaries. Acceptance criteria help development teams define the boundaries of a user story. In other words, acceptance criteria help you confirm when the application functions as desired, meaning that a user story is completed.
To reach consensus. Having acceptance criteria synchronizes the development team with the client. The team knows exactly what conditions should be met, just as the client knows what to expect from the app.
To serve as a basis for tests. Last but not least, acceptance criteria are a cornerstone of positive and negative testing aimed at checking if a system works as expected.
To allow for accurate planning and estimation. Acceptance criteria scenarios allow for the correct division of user stories into tasks so user stories are correctly estimated and planned.
Either a client or a development team writes acceptance criteria. As a rule, criteria written by a product owner (the client) are reviewed by a member of the development team to make sure that the criteria are clearly specified and that there are no technical constraints or inconsistencies from the development perspective. Such flow is an excellent way to collaborate if a product owner has some experience in software development and is aware of how to write project documentation.
If you prefer to assign writing acceptance criteria to the development team, then a requirements analyst, project manager or QA specialist should deal with this task, since they know the technology stack and the feasibility of features.
Remember that acceptance criteria should be specified upfront and never after the development stage has started within a Sprint. Therefore, a team and a product owner should agree on minimum deliverables that will meet the product owner’s requirements.
There are several types of acceptance criteria. The most popular are rules-oriented (in the form of a list) and scenario-oriented (in the form of scenarios that illustrate each criterion). The scenario-oriented type is popular among Agile teams since it helps with getting across requirements, envisaging various use cases, and further using scenarios for manual and automated acceptance tests.
The common template for describing acceptance criteria using a scenario-oriented approach is:
Given <criterion>, when <something happens> then <this outcome results>.
The Given/When/Then format is used for writing acceptance tests that ensure that all the specification requirements are met.
This format is convenient for humans (since it’s written in a familiar cause-and-effect manner) as well as for automated testing tools like Cucumber and RSpec. For example, when we build a website that has two types of users ‒ logged-in users and guests ‒ we’re likely to write the following acceptance criteria for a user story that defines the sign-in feature for a logged-out user:
As a logged-out user
I want to be able to sign in to a website
So that I can find access my personal profile
Scenario: System user signs in with valid credentials
“Given I’m a logged-out system user
and I’m on the Sign-In page
When I fill in the “Username” and “Password” fields with my authentication credentials
and I click the Sign-In button
Then the system signs me in”
The Given/When/Then template helps you reduce the time spent on writing test cases since you describe the system’s behavior upfront. We prefer writing acceptance criteria with the first-person “I” since it helps us talk from a user’s perspective and keep a user’s needs in mind.
Here are a few tips that’ll help you write great acceptance criteria:
Keep your criteria well-defined so any member of the project team understands the idea you’re trying to convey.
Keep the criteria realistic and achievable. Define the minimum piece of functionality you’re able to deliver and stick to it. On the other hand, don’t try to describe every detail since you risk cluttering up your backlog and getting buried under many small tasks.
Coordinate with all the stakeholders so your acceptance criteria are based on consensus.
Create measurable criteria that allow you to adequately estimate development time so you’re able to stay within budget and time constraints.
Consider providing checklists that enable you to see what user stories are covered with acceptance criteria.
In this section we’ll take a look at examples of acceptance criteria written for common features present on most websites. We’ll define user stories upfront because acceptance criteria are written after we’ve specified all functionality through user stories.
Example #1
Our first user story describes the webpage search feature:
As a website user
I want to able to search on the webpage
So that I can find necessary information
According to the Given/When/Then template, the acceptance criteria would be the following:
Scenario: User searches for an item by its name
“Given that I’m in a role of registered or guest user
When I open the “Products” page
Then the system shows me the list of all products
And the system shows the “Search” section in the right top corner of the screen
When I fill in the “Search” field with the name of existing item in the product list
And I click the “Apply” button OR press the Enter key on keyboard
Then the system shows products in the Search Results section with product names matching entered product name
And the system shows the number of search results in the top of the Search Results section”
Example #2
The next example represents the acceptance criteria for a Feedback Form page. The user story would be the following:
As a website user
I want to able to submit feedback
So that the website owners can consider my opinion or concern during future website updates
Acceptance criteria for this piece of functionality would be:
Scenario: User submits feedback form with the valid data
“Given I’m in a role of logged-in or guest user
When I open the Feedback page
Then the system shows me the Submit Feedback form containing “Email”,“Name” and “Comment” fields which are required
When I fill in the “Email” field with a valid email address
And I fill in the “Name” field with my name
And I fill in the “Comment” field with my comment
And I click the “Submit Feedback” button
Then the system submits my feedback
And the system shows the “You’ve successfully submitted your feedback” flash message
And the system clears the fields of the Submit Feedback form”
Example #3
Finally, let’s specify the user story and acceptance criteria for commenting functionality on a blog. Only signed-in users are able to add comments. The user story for an “add a comment” feature would be:
As a signed-in user
I want to able to comment on a blog post
So that I can get feedback on issues
The acceptance criteria for this piece of functionality would be:
Scenario: Signed-in user leaves a comment on a blog post
“Given I’m in a role of signed-in user
When I open the page with a specific blog post
Then the system shows the “Comments” section below the blog post with the list of comments added by other users
And the system shows the “Add a Comment” field in the top of the “Comments” section
When I fill in the “Add a Comment” field with my comment
And I click the “Submit” button
Then the system saves my comment
And the system shows my comment in the top of the “Comments” section
And the system shows my username and profile picture on the left side from my comment
And the system shows “Remove” and “Edit” icons opposite my comment”
How can we get the best estimates of story size?
Well, estimating is definitely hard. But there are a few things teams can do to help this process:
Keep estimates manageable.
Estimate in relative terms.
Bucket backlog items by story size.
1. Keep Estimates Manageable
Try to keep most estimates, or at least the most important estimates within about one order of magnitude, such as from 1-10. There are studies that have shown humans are pretty good across one order of magnitude, but beyond that, we are pretty bad.
That’s why in the agile estimating method of Planning Poker, most of the cards are between 1-13. We can estimate pretty well in that range. You can get acquainted with the Planning Poker method to help make estimating easier here.
2. Estimate in Relative Terms
Estimate in relative terms rather than absolute terms. Instead of saying, "This will take five days," say, "This thing will take about as long as that thing."
In my Certified Scrum Master training class, we do an exercise where we estimate home improvement tasks. We start by agreeing on something small, but not the smallest, and perhaps calling that a 2.
For example we might decide that installing a new oven is a 2. All other items on the list can be estimated relative to this. Something that will take four times as long would get an 8, and so on.
Not only is relative estimating more accurate, teams can do it more quickly. With relative estimating, the team does not need to think of all of the sub-steps and estimate each and then add them up. They only need to find something similar and use the same estimate.
The next step is to use velocity to determine how long each of those things actually takes. Velocity is how fast the team is getting those product backlog items done. Since velocity is volatile, I like to look at data from at least five sprints to get a range.
3. Bucket Backlog Items by Story Size
It’s hard to estimate and extremely hard to estimate precisely. It’s good then, to make estimating easier by not requiring teams to put exact values on every item they estimate.
Pre-identify a set of values teams will estimate with. A team might choose to use the Fibonacci sequence of 1, 2, 3, 5, 8 and 13, which is my slight preference.
The numbers in these sequences can be viewed as buckets. Using the latter sequence we have a 5-point bucket and an 8-point bucket.
The team doesn’t have to precisely estimate how long a given product backlog item will take. Instead, the team has only to put the product backlog item into the right bucket: “Does this item belong in the 5-point bucket or the 8-point bucket?” (Or perhaps some other bucket.)
This saves times in estimating meetings by removing the pressure to be perfect. By removing pressure, it also helps get team members to engage in the process.
Epic: Large initiatives delivering new products, solutions, or services to customer. Comprised of a large collection of features.
Feature: Capabilities that the product Owner is interested in that provides value to users. Realized by some number of user stories in multiple sprints.
Story: a self-contained unit of work agreed upon by the developers and the stakeholders. Delivered within a single sprint.
Task: Team-member-identified item that needs to be addressed for the user story to be completed.
Reference Materials:
User Story Template
Be sure to follow these guidelines when writing User Stories in JIRA:
Title
| Labels
|
Description As a <specific user> I want to <do a thing> so that <business value>. | Epic
Effort
Iteration Path
Priority
Value
Related Links
|
Acceptance Criteria Given <criterion>, when <something happens> then <this outcome results>. Conditions
Exceptions
|
TIP: If User Story requires more than two or three Acceptance Criteria it may be too big, unless it can be done in a single sprint.
File | Modified |
---|
- No labels