Learn

/

Acceptance Criteria

Acceptance Criteria

7 patterns

Given, When, Then for outcomes a neutral reader can verify. The line between completeness and over-specification, and how to keep implementation notes out of the AC list.

Avoid
Story
INV-12
3 pts
Inventory page shows out-of-stock items
Acceptance criteria
Out-of-stock handling is implemented properly
The UX is good

Prefer
Story
INV-12
3 pts
Inventory page shows out-of-stock items
Acceptance criteria
Givenan item with stock = 0
Whenit appears in the inventory list
Thenit shows an 'Out of stock' badge and the row is dimmed
Givenan item with stock > 0
Whenit appears in the inventory list
Thenthe row renders normally with no badge
Why avoid

'Implemented properly' and 'the UX is good' are not acceptance criteria, they are reassurance. Two engineers will reasonably disagree on whether the bar is met, and the disagreement will surface in review.

Why prefer

Each criterion is observable. A reader who has not seen the code can open the page and confirm. The before/after is binary, which means QA, design, and the PM can all sign off independently.

Dan North: Introducing BDD
Avoid
Story
AUTH-77
3 pts
Users with expired sessions are redirected to sign-in
Acceptance criteria
Check the session in the middleware
If invalid, send a 302 to /sign-in
Preserve the original URL in callbackUrl

Prefer
Story
AUTH-77
3 pts
Users with expired sessions are redirected to sign-in
Acceptance criteria
Givena user whose session has expired
Whenthey navigate to a protected route
Thenthey land on /sign-in with the original URL in callbackUrl
Givena user with a valid session
Whenthey navigate to a protected route
Thenthey reach the route without redirect
Why avoid

The left list is implementation steps. They might be correct, but they describe how the engineer will write the code, not what behavior the user will observe. QA cannot test 'check the session in the middleware'.

Why prefer

Given/When/Then forces the writer to name the precondition, the action, and the outcome. There is no ambiguity for QA, no implementation language, and the negative case (valid session) is named explicitly.

Dan North: Introducing BDD
Avoid
Story
PAY-21
5 pts
Customer pays with a saved card at checkout
Acceptance criteria
Givena customer with a saved card
Whenthey click Buy
Thenthe order is placed and they see the confirmation page

Prefer
Story
PAY-21
5 pts
Customer pays with a saved card at checkout
Acceptance criteria
Givena customer with a saved card
Whenthey click Buy
Thenthe order is placed and they see the confirmation page
Givena customer whose card has expired
Whenthey click Buy
Thenthey are prompted to update payment without losing the cart
Giventhe payment provider is unavailable
Whenthe customer clicks Buy
Thenthey see a retry banner and the cart is preserved
Why avoid

Happy-path-only acceptance criteria leave the failure modes to be discovered. They will be discovered by users, then filed as bugs, then patched, then re-broken on the next change.

Why prefer

Real systems fail. Naming the expired-card and provider-down paths in advance gives engineering a real spec and gives QA a real test plan. The cart preservation rule comes out of the conversation, not the bug report.

Bill Wake: INVEST in Good Stories
Avoid
Story
FEED-44
3 pts
Activity feed prepends new items in real time
Acceptance criteria
Subscribe to the WebSocket /v1/feed channel
Use a ring buffer of 200 items in memory
Reuse the existing prepend animation

Prefer
Story
FEED-44
3 pts
Activity feed prepends new items in real time
Acceptance criteria
Givena feed open in the browser
Whena new activity is published by another user
Thenthe new item appears at the top within 2 seconds without a manual refresh
Givena feed scrolled below the top
Whena new item arrives
Thenthe user's scroll position is preserved
Why avoid

A bullet list of implementation hints is a tech-design doc, not acceptance criteria. The team will probably do those things, but the story is now unverifiable by QA and the implementation is locked in before refinement.

Why prefer

Acceptance criteria describe what the user observes. Implementation choices (WebSocket channel, ring buffer, animation reuse) are subtask material. Keep them separate so the story can be reviewed by people who do not know the codebase.

Agile Alliance: User Story Template
Avoid
Story
EX-66
5 pts
Customer exports their order history
Acceptance criteria
Givena signed-in customer
Whenthey click Export on /orders
Thenthey receive a CSV of their order history

Prefer
Story
EX-66
5 pts
Customer exports their order history
Acceptance criteria
Givena signed-in customer
Whenthey click Export on /orders
Thenthey receive a CSV of their order history
Out of scope:PDF export, scheduled exports, and emailed exports (separate stories).
Why avoid

Without an out-of-scope clause, every reviewer assumes a different boundary. PDF and email exports will be raised in standup, the work will balloon, and the story will not finish in the sprint.

Why prefer

Naming what is out is as important as naming what is in. During refinement someone will ask 'what about PDFs?' and the story already answers. The team does not get pulled into scope creep mid-sprint.

Atlassian Team Playbook: User Stories
Avoid
Story
PERF-31
3 pts
Search returns results quickly on cellular
Acceptance criteria
Givena user on a cellular connection
Whenthey search for a query
Thenthe first results feel fast and there is no long spinner
The perf suite covers the search path

Prefer
Story
PERF-31
3 pts
Search returns results quickly on cellular
Acceptance criteria
Givena 4G connection (Chrome devtools 'Slow 4G')
Whena user searches for a top-100 query
Thenthe first result row is visible within 400ms (p75) and 800ms (p99)
A regression test in the perf suite catches drops below those thresholds
Why avoid

'Feels fast' is unverifiable and unprotectable. The next refactor will land, the response time will drift, and nobody will notice until users start complaining again.

Why prefer

Numbers anchor performance work. The defined connection profile, percentile thresholds, and regression test mean future changes either preserve the bar or fail visibly. Without those, performance work decays back to where it started within two sprints.

Bill Wake: INVEST in Good Stories
Avoid
Story
PRO-12
2 pts
User profile page shows verified-email indicator
Acceptance criteria
Givena user with a verified email
Whenthey view their profile
Thena green 'Verified' badge is shown next to the email
Givena user with an unverified email
Whenthey view their profile
Thena 'Not verified' link is shown next to the email
Givena user with no email
Whenthey view their profile
Thenno badge is shown

Prefer
Story
PRO-12
2 pts
User profile page shows verified-email indicator
Acceptance criteria
Verified email shows a green 'Verified' badge
Unverified email shows a 'Not verified' link to the verification flow
Missing email shows no badge
Why avoid

Given/When/Then is a forcing function for unambiguous state, action, and outcome. For 'three visual variants on a static page' it adds line count without information. The bullets read faster.

Why prefer

Format matters less than the property. For a simple list of constraints, three bullets are cleaner than three identical Given/When/Then blocks. Use Given/When/Then when state and timing matter; use bullets when they don't.

Dan North: Introducing BDD