One particular template, often referred to as “As a… I want to… So That…” is the most commonly recommended aid (often outgrown once past the novice stage) for teams and product owners starting to work with user stories and product backlog items in general:
- As a (who wants to accomplish something)
- I want to (what they want to accomplish)
- So that (why they want to accomplish that thing)
An example:
- As a bank customer
- I want to withdraw money from an ATM
- So that I’m not constrained by opening hours or lines at the teller’s
The Given-When-Then formula is a template intended to guide the writing of acceptance tests for a User Story:
- (Given) some context
- (When) some action is carried out
- (Then) a particular set of observable consequences should obtain
An example:
- Given my bank account is in credit, and I made no withdrawals recently,
- When I attempt to withdraw an amount less than my card’s limit,
- Then the withdrawal should be complete without errors or warnings
Template:
-
As a (who wants to accomplish something)
-
I want to (what they want to accomplish)
-
So that (why they want to accomplish that thing)
-
(Given) some context
-
(When) some action is carried out
-
(Then) a particular set of observable consequences should obtain