Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

OS 1.1 (8 of 8): Write good user stories

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

45 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

One sentence, one person

Which is easier to understand?

A: "The system shall provide a facility for the retrieval of old orders."

B: "As a customer, I want to see my past orders, so that I can order the same pizza again."

B names a person, a wish and a reason. That is a user story (one sentence about who wants what, and why).

Key words

WordWhat it meansExample
User storyOne sentence that says who wants something, what they want and why.As a student, I want to pay by card, so that I do not need cash.
RoleThe kind of person in the story.student, driver, shop owner
GoalWhat the person wants to do.pay by card
ReasonWhy the person wants it: the value.I do not need cash
Acceptance criteriaShort checks that show the story is done.A receipt is shown after payment.
EpicA very big story that you split into smaller ones.Manage my account
BacklogThe list of all stories waiting to be built.a list on a board

The cells students fill in are left blank in this preview.

A story has three parts

PartStarts withExample
RoleAs a ...As a bus passenger,
GoalI want ...I want to see the next bus time,
Reasonso that ...so that I do not wait a long time in the rain.

The cells students fill in are left blank in this preview.

Which part of the story is it?

Have a go

Which part of the story is it?

6 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Quick check: good or weak?

Have a go

Quick check: good or weak?

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Make a weak story better

WeakWhy it is weakBetter
Add a search box.No person, no reason.As a shopper, I want to search for a product, so that I find it fast.
As a user, I want it to be fast."User" is too wide (it means everybody). "Fast" has no number.As a shopper, I want the page to load in 3 seconds, so that I do not give up.
As a user, I want to manage everything.Too big. It is an epic.Split it: change my password; change my address; delete my account.

The cells students fill in are left blank in this preview.

Your turn: a story checker

Write two small functions that work with text. The first checks that a sentence is a user story: it must have "As a", then "I want", then "so that", in that order. Ignore capital letters. The second finds the role in a story. Press Run Tests to check your work.

Code: python
def is_user_story(text):
    # A user story has three parts, in this order:
    # "As a", then "I want", then "so that".
    # Give back True if all three are there in that order, otherwise False.
    return None


def story_role(text):
    # Give back the role: the words between "As a " and ", I want".
    # For "As a student, I want to pay by card, so that I do not need cash."
    # the role is "student".
    return None

Make a free account to save your work, or press Start lab to work through the whole lesson.

A good story is small and testable

Tip

A good story is small enough to finish in a few days. You can also test it. Write "Done when" lines under it. These lines are the acceptance criteria.

A story with acceptance criteria

PartText
StoryAs a student, I want to book a library room, so that I have a quiet place to study.
Done when 1I can pick a day and a time.
Done when 2I cannot book a room that is already taken.
Done when 3I get a message that says the booking worked.

The cells students fill in are left blank in this preview.

Your turn: write six stories

A school wants an app for its library. Students can borrow books, reserve books and see when a book is due back.

Write six user stories. Use at least three different roles, for example student, teacher and librarian.

Use this template for each story:

Story 1: As a ..., I want ..., so that ... Done when: (write two checks)

Example: Story: As a student, I want to see when my book is due back, so that I do not pay a late fee. Done when: the due date is shown on my account page. A message appears 2 days before the date.

Check each story: Does it name a real role? Is the reason clear? Is it small? Can you test it?

A teacher marks this in a college. Nothing you write here is kept: it goes when you leave the page.

Make a free account to save your work, or press Start lab to work through the whole lesson.

Key words crossword

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Exit quiz

Have a go

Exit quiz

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.