eProd

eProd

Writing Effective Acceptance Criteria: Complete Guide

Learn how to write clear, testable acceptance criteria for user stories. Includes templates, examples, and best practices for agile teams.

Productivity

Writing Effective Acceptance Criteria: Complete Guide

Acceptance criteria define when a user story is complete. Good criteria prevent misunderstandings, reduce rework, and ensure everyone agrees on "done."

What Are Acceptance Criteria?

Acceptance criteria are specific conditions a user story must satisfy to be considered complete and acceptable to stakeholders.

Purpose

  • Clarify requirements: Remove ambiguity
  • Define scope: What's in/out
  • Enable testing: Create test cases directly
  • Align team: Shared understanding of done
  • Prevent scope creep: Clear boundaries

Acceptance Criteria vs. Other Concepts

ConceptPurposeScope
Acceptance CriteriaDefine story completionSingle user story
Definition of DoneGeneral quality standardsAll stories
RequirementsWhat system should doFeature/epic level
Test CasesHow to verifyImplementation detail

Format: Given-When-Then

Most teams use Gherkin-style format:

Given [precondition/context]
When [action/event]
Then [expected outcome]

Example: Login Feature

User Story: As a user, I want to log in so that I can access my account.

Acceptance Criteria:

  1. Valid login

    • Given I'm on the login page
    • When I enter valid email and password
    • Then I'm redirected to my dashboard
  2. Invalid password

    • Given I'm on the login page
    • When I enter valid email but wrong password
    • Then I see "Invalid credentials" error
    • And I remain on login page
  3. Empty fields

    • Given I'm on the login page
    • When I click Submit with empty email or password
    • Then I see "Please fill in all fields" error
  4. Remember me

    • Given I check "Remember me" checkbox
    • When I log in successfully
    • Then I stay logged in after closing browser

Why This Format Works

  • Clear: Specific scenarios
  • Testable: Maps directly to test cases
  • Consistent: Same structure every time
  • Complete: Covers happy path + edge cases

Alternative Formats

Checklist Style

Simpler for straightforward stories:

- User can enter email and password
- System validates credentials
- Valid login → dashboard
- Invalid login → error message
- "Remember me" persists session

When to use: Simple CRUD operations, basic features

Rule-Based

For business logic:

- If order total < $50 → shipping = $5.99
- If order total ≥ $50 and < $100 → shipping = $2.99
- If order total ≥ $100 → shipping = free
- If customer is Premium → always free shipping

When to use: Complex business rules, calculations

Characteristics of Good Acceptance Criteria

1. Specific

❌ Vague: "System should be fast" ✅ Specific: "Page loads in under 2 seconds on 4G connection"

2. Measurable

❌ Subjective: "Easy to use" ✅ Measurable: "New user completes signup in under 3 minutes without help"

3. Testable

❌ Untestable: "Users like the new design" ✅ Testable: "New design passes A/B test with 5% lift in conversions"

4. From User Perspective

❌ Technical: "API returns JSON with user object" ✅ User-focused: "User sees their profile data on screen"

5. Independent

Each criterion should stand alone:

  • Can be tested separately
  • Doesn't depend on order
  • Doesn't duplicate others

6. Complete

Covers:

  • Happy path (normal use)
  • Edge cases (boundaries)
  • Error conditions
  • Non-functional requirements (performance, security)

Common Scenarios & Examples

Search Feature

User Story: As a user, I want to search products so that I can find what I need.

Acceptance Criteria:

  1. Basic search

    • Given I'm on any page
    • When I enter text in search box and press Enter
    • Then I see results page with matching products
  2. No results

    • Given I search for "xyzabc123" (non-existent)
    • When search completes
    • Then I see "No results found for 'xyzabc123'"
    • And suggestions for related searches
  3. Filtering

    • Given I'm on search results page
    • When I select category filter
    • Then results update to show only that category
  4. Performance

    • Given database has 1M products
    • When I search
    • Then results appear within 1 second

Payment Processing

User Story: As a customer, I want to pay with credit card so that I can complete my purchase.

Acceptance Criteria:

  1. Valid payment

    • Given I have items in cart
    • When I enter valid card details and submit
    • Then payment processes successfully
    • And I see order confirmation
    • And I receive confirmation email
  2. Invalid card

    • Given I enter card with invalid number
    • When I submit payment
    • Then I see "Invalid card number" error
    • And payment is not processed
  3. Declined payment

    • Given my card has insufficient funds
    • When I submit payment
    • Then I see "Payment declined" message
    • And I can try different payment method
  4. Security

    • Given I'm on payment page
    • Then connection is HTTPS
    • And card details are not stored in session/cookies
    • And CVV is required for all transactions

Email Notification

User Story: As a user, I want to receive email when my order ships so that I know when to expect delivery.

Acceptance Criteria:

  1. Email sent

    • Given my order status changes to "Shipped"
    • Then I receive email within 5 minutes
    • And email contains tracking number
    • And email contains estimated delivery date
  2. Email content

    • Given I receive shipping email
    • Then subject line includes order number
    • And body includes product names and quantities
    • And tracking link goes to carrier website
  3. Unsubscribed users

    • Given I've unsubscribed from marketing emails
    • When my order ships
    • Then I still receive shipping notification (transactional)
  4. Failed delivery

    • Given email send fails
    • Then system retries 3 times
    • And logs failure
    • And displays notification in app

Writing Process

Step 1: Understand the Story

  • Read user story
  • Discuss with stakeholders
  • Identify user's goal
  • Understand context

Step 2: Brainstorm Scenarios

Consider:

  • Happy path (ideal flow)
  • Alternative paths
  • Edge cases
  • Error conditions
  • Non-functional requirements

Step 3: Write Criteria

For each scenario:

  • Use Given-When-Then format
  • Be specific and measurable
  • Focus on outcomes, not implementation

Step 4: Review

Check:

  • Testable?
  • Specific?
  • Complete (covers all scenarios)?
  • Independent?
  • From user perspective?

Step 5: Refine

  • Remove ambiguity
  • Add missing scenarios
  • Clarify vague terms
  • Get stakeholder sign-off

Common Mistakes

1. Too Vague

❌ "System should handle errors gracefully"

What errors? What's "gracefully"?

✅ "When API call fails, show 'Something went wrong. Please try again.' and log error to monitoring"

2. Too Technical

❌ "POST /api/users returns 201 with user JSON"

Criteria should describe user value, not API details.

✅ "After signup, user sees 'Welcome!' message and can access dashboard"

3. Missing Edge Cases

✅ Happy path: User uploads 1 file ❌ Missing: What if user uploads 10 files? 100? 0? Invalid format?

✅ Complete:

  • User can upload 1-10 files
  • Max size 5MB per file
  • Supported formats: jpg, png, pdf
  • Error shown for invalid format/size

4. Implementation Details

❌ "Use React component with useState hook"

Acceptance criteria define what, not how.

✅ "Form remembers entered data when validation fails"

5. Not Testable

❌ "Users find it easy to navigate"

How do you test "easy"?

✅ "90% of test users complete task without asking for help"

Non-Functional Acceptance Criteria

Don't forget:

Performance

  • Page load time
  • API response time
  • Concurrent users supported

Security

  • Authentication required
  • Data encryption
  • Permission checks

Accessibility

  • Keyboard navigation
  • Screen reader support
  • Color contrast

Compatibility

  • Browsers supported
  • Mobile responsiveness
  • Offline functionality

Example:

- Page loads in under 2 seconds on 3G
- Works on Chrome, Firefox, Safari (last 2 versions)
- Accessible via keyboard (no mouse required)
- Responsive on screens 320px - 4K
- HTTPS required

Tools & Automation

Manual Documentation

  • Jira/Azure DevOps custom fields
  • Confluence pages
  • Google Docs with template

Automated Testing

Map criteria directly to tests:

Acceptance Criterion:

Given I'm logged in
When I click "Logout"
Then I'm redirected to home page
And session is cleared

Cucumber Test:

Scenario: User logs out
  Given I'm logged in
  When I click "Logout"
  Then I see home page
  And my session cookie is deleted

AI Assistance

Use our Acceptance Criteria Generator:

  1. Enter user story
  2. Get comprehensive criteria
  3. Edit to match your context
  4. Add to ticket

Team Collaboration

Who Writes Criteria?

Product Owner:

  • Initial draft
  • Business perspective
  • User value focus

Developers:

  • Technical feasibility
  • Edge cases
  • Implementation considerations

QA:

  • Testability
  • Missing scenarios
  • Clarifications

Best: Collaborative session (3 Amigos)

3 Amigos Meeting

Attendees: Product Owner, Developer, QA

Agenda:

  1. PO presents user story (5 min)
  2. Team asks questions (10 min)
  3. Brainstorm scenarios (10 min)
  4. Write criteria together (15 min)
  5. Review for completeness (5 min)

Result: Shared understanding + comprehensive criteria

Template

Use this template:

User Story: As a [role], I want [feature] so that [benefit].

Acceptance Criteria:

1. [Scenario name - Happy Path]
   Given [context]
   When [action]
   Then [outcome]
   And [additional outcome]

2. [Scenario name - Alt Path]
   Given [context]
   When [action]
   Then [outcome]

3. [Scenario name - Error Case]
   Given [context]
   When [action]
   Then [error handling]

Non-Functional:
- Performance: [metric]
- Security: [requirement]
- Accessibility: [requirement]

Conclusion

Effective acceptance criteria:

  • Remove ambiguity
  • Enable testing
  • Align team
  • Prevent rework

Quick checklist:

  • Written in Given-When-Then format
  • Covers happy path + edge cases
  • Specific and measurable
  • Testable
  • From user perspective
  • Includes non-functional requirements

Use our Acceptance Criteria Generator to create comprehensive criteria in seconds, then refine for your specific context.