Comparison
Should we write user stories or use cases?
Your team is moving to short iterations, and someone has declared use cases the old way and user stories the new. Choose by which sounds newer and you’ll lose the thing use cases are best at: what happens when a step goes wrong.
A narrative, or pieces to plan
A user story is a short need written from the user’s side, usually “As a [role], I want [goal], so that [benefit]”.6 It was never meant to hold the whole requirement. The card is a token; the conversation it starts carries the requirement, and an acceptance test confirms it.4 Detail arrives as the story gets close to being built.3
A use case is a prose description of how a system behaves when someone uses it: an actor, a goal, the main path, then the alternatives and failures, which is where its real value lies.2 It’s the older idea by decades, with roots in usage scenarios at a telephone company in the late 1960s,2 long before the first paper to call them use cases.5
Put simply, a use case tells the story of how someone uses the system, and stories cut the requirements into pieces you can plan.1
Booking an appointment, both ways
Take booking an appointment at an invented clinic. Written as a use case, the front-desk lead is the actor. She selects the patient, the system shows free slots, she picks one, and it confirms and texts the patient. Then come the alternatives. At step two there are no free slots, so the system offers the waiting list. At step four the patient has no mobile number, so it prints a reminder card. Nobody had written either of those as a story. Walking the whole path, failure by failure, is what turned them up.
Written as stories, the same flow catches something the use case doesn’t: “As a solo front-desk lead, I want a booking to save as I type, so that I don’t lose it when the phone rings.” Its confirmation: given a half-filled booking, when the page closes, the draft is there when she comes back. No use case would list a ringing phone as an alternative path. It isn’t one. It’s what her day is like.
So a story might cover a whole use case, one step of it, or something the use case never set out to describe.1 Do you need both? In theory, yes; on a real project, usually not.1 Write the use case where its alternatives earn their place, and don’t expect one story per use case.3 Nor are use cases somehow un-agile: Scrum’s own primer says backlog items can be stories, use cases or whatever the team finds useful.5
What are you trying to find out?
Write user stories when
- work is planned in short iterations, and detail can be settled as each piece comes up.
- you want each piece small enough to estimate, build and check on its own.
Write a use case when
- the alternatives and failures matter as much as the main path.
- the whole behaviour has to be reviewed before anything is built.
Who goes in the first slot
That autosave story names a role, not “a user”. A backlog where every story begins “As a user” is a sign something’s missing,7 and user story vs job story takes that up. Often the quicker fix is a persona to point at. Write the front-desk lead once, in the persona creator, and every story about the role, and the actor in every use case, has the same answer to “who is this for?”
Sources
- “UseCasesAndStories”, Martin Fowler, martinfowler.com, 2003https://martinfowler.com/bliki/UseCasesAndStories.htmlUse cases as a narrative and stories as chunks for planning, how stories map onto use cases, and whether you need both.
- “Use Cases, Ten Years Later”, Alistair Cockburn, STQE magazine, 2002https://www.dsc.ufcg.edu.br/~garcia/cursos/ger_processos/seminarios/Crystal/Use%20Cases,%20Ten%20Years%20Later.htmThe definition of a use case, its value in the alternatives, where to use one, and Jacobson’s usage scenarios at Ericsson from 1967.
- “User Stories”, Agile Alliance glossaryhttps://www.agilealliance.org/glossary/user-stories/Detail added as a story nears being built, and the pitfall of assuming a story maps one-to-one onto a use case.
- “Essential XP: Card, Conversation, Confirmation”, Ron Jeffries, 2001https://ronjeffries.com/xprog/articles/expcardconversationconfirmationThe card, the conversation and the confirmation, in Jeffries’s words.
- “Use case”, Wikipediahttps://en.wikipedia.org/wiki/Use_caseJacobson’s first paper on use cases at OOPSLA in 1987, and the Scrum Primer’s line on backlog items.
- “User story”, Wikipediahttps://en.wikipedia.org/wiki/User_storyThe role, goal and benefit template, devised by the Connextra team in London in 2001.
- “Job Stories Offer a Viable Alternative to User Stories”, Mike Cohn, Mountain Goat Softwarehttps://www.mountaingoatsoftware.com/blog/job-stories-offer-a-viable-alternative-to-user-storiesStories that all begin “As a user” as the signal to try job stories.