How to Write Good Functional Requirements: User Stories and Acceptance Criteria
Write clear, testable functional requirements with user stories, INVEST, Given-When-Then acceptance criteria, use cases and good vs bad examples.
Published November 27, 2026
A functional requirement is only useful if a developer can build it and a tester can verify it without guessing what was meant. Most bad requirements are not wrong, just ambiguous: "the user can manage their profile" can mean a dozen different things. This guide covers formats that remove ambiguity: user stories, acceptance criteria in Given-When-Then form, and use cases for complex flows.
The concept
A user story captures who wants something and why: As a [role], I want [capability], so that [benefit]. The "so that" part is often skipped and is the most valuable, because it lets the team propose simpler solutions that still deliver the benefit. A story on its own is a placeholder for a conversation, not a complete specification.
Acceptance criteria make a story testable. The Given-When-Then format (from behaviour-driven development) states a starting context, an action, and an observable outcome. Good criteria cover the happy path, important edge cases and error handling. When a flow has many branches, such as checkout with multiple payment methods, a use case with a main success scenario and numbered alternative flows can be clearer than many separate stories.
Building a story
- Who: name a real role (shopper, admin, API client)
- What: one capability, phrased as user intent, not UI
- Why: the benefit or outcome
- Acceptance criteria: happy path, edge cases, errors (Given/When/Then)
- Examples: concrete data that makes each criterion unambiguous
INVEST: a checklist for good stories
| Letter | Means | Check |
|---|---|---|
| I | Independent | Can be built and released without waiting on another story |
| N | Negotiable | Describes the need, leaves room for how |
| V | Valuable | Delivers value to a user or the business on its own |
| E | Estimable | The team understands it well enough to size it |
| S | Small | Fits comfortably in one iteration |
| T | Testable | Has clear acceptance criteria |
Rewriting weak requirements
| Bad requirement | Problem | Better |
|---|---|---|
| Users can manage their profile | Vague scope | Users can change display name and avatar; email change requires re-verification |
| Search should be smart | Untestable | Search matches misspellings within edit distance 1 (e.g. "shose" → "shoes") |
| Add a dropdown for country | Prescribes UI, hides need | Users can select their country from the supported list during signup |
| Handle errors properly | Undefined | If payment fails, show the provider's reason and keep the cart intact |
Refining requirements together
Practical examples
A complete story
Readable by business people, precise enough for developers and testers.
Story: Password reset
As a registered user who forgot my password
I want to reset it by email
So that I can regain access without contacting support
Scenario: Successful reset
Given a registered user with email "asha@example.com"
When she requests a password reset
Then she receives an email with a reset link within 1 minute
And the link expires after 60 minutes or after one use
Scenario: Unknown email
Given no account exists for "nobody@example.com"
When a reset is requested for that email
Then the page shows the same confirmation message as for a real account
And no email is sentUse case for a complex flow
Main success scenario with numbered alternatives.
Use case: Checkout
Main success scenario:
1. Shopper reviews cart and selects "Checkout"
2. System shows saved addresses; shopper selects one
3. Shopper chooses a payment method and confirms
4. System charges payment and creates the order
5. System shows confirmation and emails a receipt
Alternatives:
2a. No saved address: shopper enters a new address, system validates PIN code
4a. Payment declined: system shows reason, cart unchanged, return to step 3
4b. Item went out of stock: system removes it, shows updated total, return to step 3Executable acceptance criteria
Gherkin scenarios can run as automated tests (Cucumber, Behave, Playwright-BDD).
npx cucumber-js features/password_reset.featureCommon mistakes
- Writing stories from the system's perspective ("the system shall...") instead of the user's.
- Specifying UI controls rather than the underlying need.
- Only describing the happy path.
- Huge "epic" stories that cannot be estimated or tested.
- Acceptance criteria that restate the story instead of giving observable outcomes.
Key takeaways
- User stories capture role, capability and benefit; acceptance criteria make them testable.
- Use Given-When-Then with concrete examples to remove ambiguity.
- Check stories against INVEST.
- Use cases with alternative flows suit complex, branching processes.
FAQ
Are "shall" statements still used?
Yes, in regulated industries and formal SRS documents ("The system shall lock the account after 5 failed attempts"). They work if each statement is atomic and testable.
Who writes acceptance criteria?
Typically the product owner drafts them, and developers and testers refine them together before development.
How detailed should requirements be?
Detailed enough that the team agrees on what "done" means. Higher-risk or regulated features deserve more detail.