Acceptance Criteria: How to Write Them, With Examples in 2026
In this article
The Quick Answer
Acceptance criteria are the conditions a user story must meet before the product owner accepts it. They describe observable behavior from the outside - what a user, an API client or another system can see - and say nothing about how the work is built.
What testable means: two people reading the criterion independently would agree on whether a given build passes. "The export should be fast" fails that test. "An export of 50,000 rows completes within 30 seconds" passes it.
The two formats: Given-When-Then scenarios for behavior that depends on state and sequence, and a rule list for constraints that hold regardless of sequence. Most stories need both.
This article covers testability, the two formats, five worked before-and-after examples, a quality checklist, the Definition of Done and Definition of Ready, how many is too many, who writes them, and turning them into test cases. For the sign-off stage, see our user acceptance testing guide.
What Makes an Acceptance Criterion Testable
Most bad acceptance criteria are not wrong. They are unfalsifiable - no build could fail them. Five properties fix that.
- Observable. Stated as something visible from outside: a screen, a response, an email, a record. "The system validates the email" is not observable. "The message 'Enter a valid email address' appears and the form is not submitted" is.
- Specific. Numbers, names, limits. "Large files" and "appropriate users" each hide a decision somebody will make later, alone, under deadline.
- Independent of implementation. "The discount is stored in the promotions table" constrains the developer and tells the user nothing.
- Binary. Pass or fail. If the honest answer is "mostly", it is two criteria or none.
- Covers the unhappy path. Invalid input, missing permission, empty state, a failed dependency. The happy path is the part everyone already agrees on.
The quickest check is adversarial: imagine a build that satisfies the wording and is still obviously wrong. "Users can reset their password" is satisfied by a reset link that never expires. That is not pedantry; it is how the words get read with two days left in the sprint.
Criteria are not the test plan: they state what must be true for acceptance, not every input a tester will try. Boundaries and combinations belong in the test cases derived from them.
Two Formats: Given-When-Then and Rule Lists
Given-When-Then comes from behavior-driven development, popularized by Dan North in the mid-2000s, and it is the structure of Gherkin, the language Cucumber and similar tools execute. Given is the starting state, When is the single action or event, Then is the observable outcome, and "And" extends any clause. The discipline that matters is one When per scenario. Two actions means two scenarios, or a scenario that has quietly become a test script.
A rule list is a plain set of statements that must all hold: "The file name is orders-YYYY-MM-DD.csv." "Dates are in ISO 8601." No setup, no sequence.
| Use Given-When-Then when | Use a rule list when |
|---|---|
| The outcome depends on prior state - logged in, code already used, account locked | The constraint holds whatever the state |
| Different starting conditions produce different outcomes | You are describing format, content or limits |
| You intend to automate the criteria as BDD scenarios | The criterion is non-functional - a response time, a size limit |
The failure is forcing one format onto everything. "Given I am on the export page, When I open the file, Then the columns are in this order" is a rule in a scenario costume. The opposite is "discounts apply correctly to eligible orders", which hides the conditional behavior that needed spelling out.
Worked Examples: Before and After
Five stories, each with a typical first draft and a rewrite a tester could work from.
1. Login with account lockout
Before - "Users can log in. The account is locked after too many failed attempts."
"Too many" is a number someone will pick at implementation time, and nothing says what locked means. After:
- Given a registered user, When they submit the correct email and password, Then they land on their dashboard.
- Given a user has entered a wrong password 4 times within 15 minutes, When they enter a wrong password a fifth time, Then the account is locked for 30 minutes and "Too many attempts. Try again in 30 minutes or reset your password." is shown.
- Given an account is locked, When the user submits the correct password, Then login is refused with the same message.
- Given an account is locked, When the user completes a password reset, Then the lock is cleared.
- Rule: the failed-login message is identical whether or not the email is registered.
The last line is the one most drafts miss. Different messages for "unknown email" and "wrong password" reveal which addresses have accounts, which is why OWASP's authentication guidance recommends a generic one.
2. CSV export of orders
Before - "Admins can export orders to CSV. The export should include all relevant fields and be fast."
After - one scenario, the rest rules:
- Given an admin has filtered the orders list, When they click Export CSV, Then a file downloads containing exactly the orders matching the filter.
- Columns, in order: Order ID, Order date, Customer email, Status, Total, Currency.
- Dates are ISO 8601 in UTC, for example 2026-10-17T14:05:00Z.
- Totals use a period as the decimal separator and no thousands separator, whatever the admin's locale.
- The file opens in Excel with accented customer names displayed correctly.
- Up to 50,000 orders, the download completes within 30 seconds. Above that, the admin is told the file will be emailed.
- If the filter matches no orders, the Export CSV button is disabled.
"All relevant fields" became a named column list, which is where the real conversation happened - finance needed Currency, which nobody had mentioned. "Fast" became a threshold with defined behavior beyond it. The Excel line looks fussy until every "é" in a customer name turns into two characters.
3. A discount rule
Before - "10% discount for new customers on orders over £100."
Every word hides a question. Over, or at least? Before or after VAT and shipping? Is a new customer one with no completed order? Once decided, an examples table records the answers:
Scenario Outline: First-order discount
Given a customer with <previous_orders> completed orders
And a basket subtotal of <subtotal> including VAT, excluding shipping
When they reach the checkout summary
Then the discount shown is <discount>
Examples:
| previous_orders | subtotal | discount |
| 0 | 99.99 | 0.00 |
| 0 | 100.00 | 10.00 |
| 1 | 250.00 | 0.00 |
Plus two rules: the discount does not combine with other promotion codes, and the customer receives whichever single discount is larger; and a partial return that takes the order below £100 does not reverse it.
An examples table is the right tool whenever a rule has a threshold. It forces the boundary to be written down - here, that exactly £100.00 qualifies - and maps directly onto boundary-value test cases.
4. A permission change
Before - "Viewers should not be able to edit projects."
No scope. The interface only, or the API too? A project already open when the role changes? After:
- Given a user with the Viewer role, When they open a project, Then the edit, delete and share controls are not displayed.
- Given a Viewer, When they send an update or delete request to the projects API, Then the response is 403 and the project is unchanged.
- Given a user is downgraded from Editor to Viewer with a project open, When they next try to save, Then the save is refused with "Your permissions have changed" and their unsaved text stays on screen.
- Rule: Viewers can still comment and export. This is intended.
The API line matters most and UI-focused drafts routinely leave it out: hiding a button is presentation, and the permission is enforced on the server or not at all. The last line states what remains allowed, which stops a well-meaning developer removing more than was asked.
5. A non-functional story: product search
Before - "Search should be fast and work well on mobile."
- With a catalog of 200,000 products and 50 concurrent users, the 95th percentile search response time is under 800 ms, measured at the API.
- On a viewport 375 px wide, results display in a single column with no horizontal scrolling.
- With no matches, the page shows "No products match your search" and links to three popular categories.
Use a percentile rather than an average, name the load and data volume, and name the measurement point - server time and render time can differ by hundreds of milliseconds. If the team cannot agree on a number, that is the finding: nobody knows what fast means here, and the story is not ready.
A Quality Checklist for Acceptance Criteria
Run this in refinement before a story is estimated. It takes a couple of minutes per story.
- Could two people disagree on whether a build passes?
- Is every number stated - limits, thresholds, durations, counts - and is every boundary explicit?
- Is there at least one criterion for failure: invalid input, no permission, empty state?
- Does each scenario have exactly one When?
- Where something is removed or restricted, does it say what remains allowed?
- Has anything that applies to every story been moved to the Definition of Done?
- Could QA write the first test case without asking a question?
The last question matters most. Every question a tester asks after development starts could have been answered in refinement far more cheaply - the argument made at length in shift-left testing.
The banned-word test: search the story for "should", "etc.", "appropriate", "user-friendly", "correctly" and "as expected". Each marks a decision not yet made. "Etc." in particular is a promise that somebody else will finish the list.
Acceptance Criteria vs Definition of Done vs Definition of Ready
Three artifacts that are often confused, with different scopes.
| Acceptance criteria | Definition of Done | Definition of Ready | |
|---|---|---|---|
| Applies to | One story | Every story and increment | Every story, before it enters a sprint |
| Question | Does this story do what was asked? | Is the work complete to our quality standard? | Is this story clear enough to start? |
| Written by | Product owner, with the team | The team, once | The team, once |
| Changes | With every story | Rarely | Rarely |
| Example | "Locked for 30 minutes after 5 failed attempts" | "Automated tests added and passing in CI" | "Acceptance criteria reviewed by QA" |
A story is finished when it meets its own acceptance criteria and the Definition of Done - both, not either. Correct behavior with no tests is not done. Every Done item ticked for the wrong behavior is not accepted.
The Definition of Done is part of the Scrum Guide. The Definition of Ready is not - it is a widely used team practice, useful when kept to three to five items, the most valuable being that criteria have been reviewed by someone who will test them. And if "works in Chrome, Firefox and Safari" appears in forty stories, it belongs in the Definition of Done, once.
How Many Is Too Many
There is no correct number, but as a rule of thumb three to eight criteria suit a story sized to finish comfortably within a sprint. Fewer than three usually means the unhappy paths are missing. More than ten usually means one of three things:
- The story is too big. Login, lockout and password reset written as one story will carry fifteen criteria. It is three stories.
- Test cases have leaked in. Every boundary value listed individually. Keep the rule in the story and the enumeration in the tests.
- Definition of Done items are being repeated. Move them out.
The splitting test: if the criteria fall into groups that could each be delivered and accepted independently, each group is a story. The CSV export above sits at seven, about the limit. And if estimation stalls because people are arguing about a criterion, it is doing its job - that argument would otherwise have happened in UAT.
Who Writes Them and When
The product owner owns acceptance criteria, because they decide what gets accepted. Owning is not writing alone. The best criteria come out of a short Three Amigos conversation: product asks whether this is what the customer needs, development asks what happens when the dependency fails, and QA asks how anyone would know it passed.
- Draft. The product owner writes first-pass criteria, focused on intent.
- Refine. QA brings unhappy paths and boundaries; development brings constraints. Decisions go into the criteria, not a comment thread.
- Agree. Criteria are settled before the story enters a sprint.
- Change explicitly. Mid-sprint changes are updated in the story, agreed by the product owner and flagged to the tester.
For how the QA role fits across a sprint, see QA in agile. What does not vary is timing: criteria written after development describe what was built and cannot be used to accept it.
From Acceptance Criteria to Test Cases
Good criteria make test design faster. They do not replace it. Take the lockout criterion from the first example. It yields: four failures then a correct password, which succeeds; exactly five failures, which locks; five failures spread over more than 15 minutes, which does not; a login at 29 and at 31 minutes after the lock; a reset while locked; and a lock on one account leaving another untouched. Six cases from one line.
- Given-When-Then maps directly. Given becomes preconditions, When becomes steps, Then becomes the expected result. Our guide to writing effective test cases covers the rest of the structure.
- Keep the link. Each test case should reference the story and criterion it verifies, so a changed criterion tells you which cases to update. That link is the basis of a requirements traceability matrix.
- Generate the baseline, then think. Criteria this precise are structured enough for AI test case creation to draft the obvious cases in seconds, leaving the tester's time for the ones no generator would think of.
The feedback loop: if a test case cannot be written because the expected result is unclear, the gap is in the criteria. Send it back to the story, or the guess becomes the specification.
Common Mistakes
- Writing criteria after development. They document what was built and cannot fail it.
- Adjectives instead of numbers. Fast, large, intuitive - each a decision deferred to whoever implements it.
- Happy path only. The part everyone agreed on, written carefully, with the risky part left out.
- Everything forced into Given-When-Then. Rules in scenario costume, three times longer and no clearer.
- Criteria changed silently mid-sprint. The developer builds one version and the tester checks another.
- UI-only permissions. A hidden button with an open API behind it.
Conclusion
Acceptance criteria exist to move decisions forward in time. Every number, boundary and failure path written before development is a decision made once, by the right people, instead of later by whoever holds the code.
The craft is mostly precision. Replace adjectives with numbers, write the unhappy path, and use Given-When-Then where state and sequence matter and a rule list where they do not. If a tester can write the first test case without asking a question, the criteria are ready.
They deliver half their value until they are connected to the tests that verify them, so a changed criterion tells you which coverage changes with it. QA Sphere drafts test cases from your acceptance criteria with AI test case creation, keeps every case linked to its story in test case management, and connects cases and defects to the story in your tracker through issue tracker integration. See pricing or book a demo.
Written by
QA Sphere TeamThe QA Sphere team shares insights on software testing, quality assurance best practices, and test management strategies drawn from years of industry experience.



