Topic 1 of 5 · 3 min read
Writing small testable user stories
Goal: Rewrite a vague request as a user story that names the user, the need and the benefit and passes the INVEST checks.
A user story is one sentence that names who needs something, what they need and why, small enough that a team can build and check it in a few days. The usual shape is: "As a [kind of user], I want [a capability], so that [a benefit]."
Check yourself · 1 of 3
Which of these is a user story in the usual three-part shape?
Why it matters
A request such as "make checkout better" cannot be built, because nobody can say what better means. A story forces three decisions: which person is helped, what they can do afterwards, and what they gain. Those decisions are the work. If you skip them, the builder makes them for you, and a model or an AI agent does the same, with confidence and without telling you.
How to do it
- Name a real user. "As a customer" is weak if you have shop owners, staff and guests. Pick the one who feels the problem.
- State one capability. One verb the user performs. If you write "and" between two actions, you probably have two stories.
- Give the benefit. The "so that" part tells the builder what to protect when trade-offs come up. If you cannot write it, the story may not be worth building.
- Check it with INVEST. Bill Wake's INVEST lists six checks: Independent, Negotiable, Valuable, Estimable, Small and Testable. Ask each one in turn. The two that catch most problems are Small (can it ship in a few days?) and Testable (could someone prove it works?).
If a story fails Small, split it by what the user does, not by technical layer. "Pay by card" and "pay by bank transfer" are good halves. "Build the database part" and "build the screen part" are not, because neither half is usable alone.
Before and after
Before: Make it easier for people to find their old orders.
No user, no capability, no benefit, and nothing to test.
After: As a returning customer, I want to search my past orders by product name, so that I can reorder an item without scrolling through a year of history.
Now the user, need and reason are clear. It is small, and testable: type a name, see the matching orders.
What goes wrong
- Stories that hide a solution: "As a user, I want a dropdown" describes a control, not a need.
- Stories that are really tasks for the team: "As a developer, I want to refactor the API" has no user who benefits.
- Epics dressed as stories. "As a manager, I want reports" will take months, and nobody can estimate it.
An AI assistant will happily write ten tidy stories in this shape from a vague request. The shape alone proves nothing. Check each story against INVEST before you trust it.
Examples
Splitting an epic by user action
Epic: As a manager, I want reports.
Split into stories:
- As a shop manager, I want to see yesterday's total sales on one screen, so that I can check the till against the day's takings.
- As a shop manager, I want to download last month's sales as a spreadsheet, so that I can send it to my accountant.
Each story is usable alone and can be tested on its own.
Spotting a hidden solution
Weak: As a user, I want a toggle for dark mode in the header.
Better: As a night-shift nurse, I want the app to be comfortable on dim screens, so that I can read patient notes without eye strain.
The second version leaves the team free to choose a toggle, an automatic setting or something else, and says what must be true afterwards.
Key points
- A story names a user, one capability and a benefit in a single sentence.
- The 'so that' part tells the builder what to protect when trade-offs appear.
- INVEST has six checks, and Small and Testable catch most weak stories.
- Split large stories by what the user does, not by technical layer.
- A tidy format does not make a story good: an AI can fill the template around a vague request.
Common mistakes
- Writing 'As a user' for every story, which hides who really needs the change.
- Putting a solution in the 'I want' part, so the team cannot suggest a better one.
- Joining two actions with 'and' and calling it one story.
- Skipping the 'so that' part because the benefit feels obvious.
Check yourself · 2 of 3
In INVEST, what does the letter 'S' ask about a story?
Check yourself · 3 of 3
A story says: 'As a manager, I want reports.' What is the best next step?
Practice items, not counted towards your mastery.
Start here
- User Stories (Mountain Goat Software) (opens in a new tab)ArticleFree
Mike Cohn's plain overview of the story format, with the three parts and why stories stay small.
- Acceptance Criteria for User Stories (Mountain Goat Software) (opens in a new tab)ArticleFree
Short guide to writing conditions of satisfaction that tell a team when a story is done.
- INVEST in Good Stories, and SMART Tasks (Bill Wake) (opens in a new tab)ArticleFree
The 2003 article that coined INVEST, with each of the six checks explained.