User stories: a beginner’s guide to acceptance criteria

Last week I described the bones of the user story. Briefly, a user story is a description of an objective a person should be able to achieve when using your website/application/software, written in the following format

As an [actor] I want [action] so that [achievement]

For example:

As a Flickr member I want to be able to assign different privacy levels to my photos so I can control who I share which photos with.

This post adds some flesh to the idea of user stories, in the shape of acceptance criteria.

Where are the details?

At first glance, it can seem like user stories don’t provide enough information to get a team moving from an idea to a product.

Nearly 10 years ago, Ron Jeffries wrote about the Three C’s of the user story:

  • Card – stories are traditionally written on notecards, and these cards can be annotated with extra details
  • Conversation – details behind the story come out through conversations with the Product Owner
  • Confirmation – acceptance tests confirm the story is finished and working as intended.

In a project following an Agile process, user stories are discussed in meetings with the Product Owner (the person who represents the customer for the thing you’re developing, and who writes the user stories) and the development team. The user story is presented, and the conversation starts. For example:

As a conference attendee, I want to be able to register online, so I can register quickly and cut down on paperwork

Questions for the Product Owner might include:

  • What information needs to be collected to allow a user to register?
  • Where does this information need to be collected/delivered?
  • Can the user pay online as part of the registration process?
  • Does the user need to be sent an acknowledgment?

The issues and ideas raised in this Q and A session are captured in the story’s acceptance criteria.

Acceptance Criteria

Acceptance criteria define the boundaries of a user story, and are used to confirm when a story is completed and working as intended.

For the above example, the acceptance criteria could include:

  1. A user cannot submit a form without completing all the mandatory fields
  2. Information from the form is stored in the registrations database
  3. Protection against spam is working
  4. Payment can be made via credit card
  5. An acknowledgment email is sent to the user after submitting the form.

As you can see, the acceptance criteria are written in simple language, just like the user story. When the development team has finished working on the user story they demonstrate the functionality to the Product Owner, showing how each criterion is satisfied.

Including acceptance criteria as part of your user stories has several benefits:

  • they get the team to think through how a feature or piece of functionality will work from the user’s perspective
  • they remove ambiguity from requirements
  • they form the tests that will confirm that a feature or piece of functionality is working and complete.

Further reading

So that’s a brief introduction to acceptance criteria and how they fit in with user stories. For more examples of how acceptance criteria work, I really recommend this post by Sandy Mamoli (Sandy is a Wellington Agile coach and scrum master, who we work with on Digital New Zealand).  You might also like to check out this presentation on effective user stories by Mike Cohn.

Stay tuned for our blog post, where I’ll talk about how user stories get used in the development process, from the perspective of the Product Owner.

User stories: a beginner’s guide

My two favourite things about Agile development:

  1. Communication
  2. User stories.

One of the things I love about user stories (don’t worry, I’ll get to a definition soon) is that they’re a great technique to help people who aren’t used to commissioning websites or applications communicate their requirements.

I had a chat recently with a group of staff from one of our clients who were looking to add a new chunk of content to their website. They’d had a go at using an existing template, and discovered that the way they needed to present this content was quite different from anything they’d tackled so far. In addition they’d been having conversations with some of their customers, who introduced new ideas for how the content could be used.

I suggested that user stories would be a really good way to define and record what the group wanted, and would form a good basis for scoping the work required to deliver new functionality. This post is effectively a record of our conversation.

What is a user story?

A user story is a short description of something that your customer will do when they come to your website or use your application/software,  focused on the value or result they get from doing this thing.

User stories are:

  • written from the point of view of a person using your website or application
  • written in the language that your customers would use.

How do I write one?

The basic technique is simple. You take this format:

An an [actor] I want [action] so that [achievement]

… and fill it out. For example:

As a Flickr member I want to be able to assign different privacy levels to my photos so I can control who I share which photos with.

The actor makes sure you’re thinking about who will use this feature. If there isn’t an identifiable customer for the feature, you should reconsider whether you need it.

The action describes what will happen, but not *how* it will happen (so in the case above, not ‘I want to pick an option from a list of three possibilities, using a radio button display’). User stories are designed to start a conversation within the team about the best way to make this feature.

The achievement describes the ultimate purpose of the feature. If you can’t think of an achievement, that’s a signal that you should reconsider whether the feature you’re trying to describe is actually important.

And that’s the heart of the matter. For a little more detail, check out this post by Mike Cohn on the ‘user story template’. In a later post I’ll cover the INVEST model, the acceptance criteria that get attached to user stories and how user stories get used in the development process.

When do you use them?

User stories are at the core of the Agile project management methodology. However, I believe they are the most useful way of documenting what your website or application needs to do for users, regardless of how you’re running your project.

User stories should be written at the beginning of your project, before you start making any decisions about technical solutions or design. Once they’re written they should be prioritised, from most important to your customer to least important. One of the beauties of Agile is that you can keep writing and reprioritising your user stories throughout the development period.

User stories are an alternative (or possibly a complement) to requirements documents and use cases. These blog posts give good overviews of the advantages and drawbacks of these different techniques for documenting what a website or application needs to do:

Advantages of user stories for requirements – Mike Cohn

Requirements 101: User stories vs use cases – Andrew Stellman

Why use user stories?

Commonly cited benefits of user stories include:

  • they make you think about what you’re building from the end-user’s perspective
  • they lend themselves to prioritisation
  • they can be added to, modified or deleted throughout the development process
  • they capture discrete actions/functionality
  • they can be used in planning people’s work
  • they reduce upfront planning time: you only get stuck into the details when you start working on that story.

Some drawbacks:

  • they can be tricky to write for backend or process tasks
  • they don’t look like a requirements document, and therefore it can sometimes be hard to convince people (often ‘management’) that you’re “following process”.

From my perspective – as someone who’s recently moved over from the client/Product Owner role – the biggest advantage is that user stories don’t make you think about how something will be implemented; instead they focus on the who and the why. This lets clients/commissioners/Product Owners bring their expertise to bear on defining the who and the why, and lets designers and developers bring their expertise to bear on the how. In this way, user stories create a common ground where everyone involved can meet to have a conversation: as I said at the start of this post, Communication and User stories.

Coming soon

Keep an eye on the Boost blog for follow-up posts on the INVEST model, acceptance criteria, and bringing stakeholders onboard with Agile.