Skip to content
mentoor

Topic 2 of 5 · 4 min read

Acceptance criteria that leave no guesswork

Goal: Write acceptance criteria for a story that cover the main path, two edge cases and one failure case in checkable terms.

Acceptance criteria are the specific conditions a story must meet to count as done, each written so that someone can check it and say pass or fail. The story says why; the criteria say how you will know.

Check yourself · 1 of 3

Which line works as an acceptance criterion?

Choose one answer

Why it matters

Two people can read the same story and picture different results. Criteria remove that gap before work starts, which is cheaper than finding it in review. They also give testers, designers and AI agents something to check against. An agent told to "add password reset" will stop when it thinks it is finished. Criteria define where finished is.

How to do it

  1. Start with the main path. What happens when everything goes right? Write it with real values: "The user enters a registered email and sees 'Check your inbox'".
  2. Add edge cases. What happens at the limits? An empty field, the longest allowed value, a second click, two people at once.
  3. Add at least one failure case. What happens when something breaks? An unknown email, a mail server that is down, an expired link. Say what the user sees.
  4. Make every line checkable. A tester should not need to ask "what counts as fast?" Replace "quickly" with "within 2 seconds on a standard connection".
  5. Keep it short. Five to eight criteria for a small story. More means the story is too big.

Teams that want a fixed format use Given, When, Then. Given is the starting state, When is the action, Then is the result. The Gherkin language from Cucumber defines this format, and tools can run it as tests. An optional example:

Scenario: Reset link has expired
  Given a reset link was sent 2 hours ago
  When the user opens the link
  Then they see "This link has expired"
  And a button to request a new link

Before and after

Before: The reset email should be sent quickly and work properly.

"Quickly" and "properly" cannot be checked.

After: The email arrives within 1 minute. The link works once and expires after 60 minutes. An unregistered address shows the same confirmation message, so the page does not reveal which emails have accounts.

What goes wrong

  • Criteria that restate the story ("the user can reset their password") and add nothing.
  • Only the happy path, so the first real user finds the gaps.
  • Vague words such as "intuitive", "fast" and "secure" with no number or behaviour.
  • A list so long that it hides the criteria that matter.

Examples

Criteria for a search story

Story: As a returning customer, I want to search my past orders by product name, so that I can reorder quickly.

  • Typing 'kettle' shows only orders that contain a product with 'kettle' in its name.
  • Search ignores upper and lower case.
  • An empty search box shows all orders, newest first.
  • A search with no match shows 'No orders found for kettle'.
  • If the order service fails, the page shows 'Orders could not be loaded. Try again.' and keeps the search text.

Turning a vague line into a checkable one

Vague: The upload should handle big files.

Checkable: Files up to 25 MB upload and show a progress bar. A 26 MB file is rejected before upload with the message 'Files must be 25 MB or smaller'.

Key points

  • Acceptance criteria are pass or fail conditions that define when a story is done.
  • Cover the main path, at least two edge cases and one failure case.
  • Replace vague words such as 'fast' or 'intuitive' with a number or an observable behaviour.
  • Given, When, Then is an optional format: starting state, action, result.
  • Five to eight criteria fit a small story; a longer list usually means the story should be split.

Common mistakes

  • Writing criteria that only restate the story in other words.
  • Covering only the happy path and leaving errors to be discovered in production.
  • Using words such as 'user-friendly' or 'fast' with no measure.
  • Adding thirty criteria to a story that needs to be split.

Check yourself · 2 of 3

In Given, When, Then, what does the 'Given' part describe?

Choose one answer

Check yourself · 3 of 3

A story has criteria for the successful path only. Which addition helps most?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic