← Back to libraryQuestion 257 of 273
🌀Agile & QABeginner

User Stories, INVEST & Acceptance Criteria

📌 Definition:

A user story is a short, user-centric description of a feature ('As a <role>, I want <goal>, so that <benefit>'). INVEST is a checklist for good stories (Independent, Negotiable, Valuable, Estimable, Small, Testable). Acceptance criteria are the specific conditions that must be true for the story to be accepted.

📖 Detailed Explanation:

For QA, the 'T' in INVEST — Testable — is the anchor: a story you can't test isn't ready, and testability is often QA's first contribution. A well-formed story pairs the narrative with concrete acceptance criteria that define done from the user's perspective. Acceptance criteria are the backbone of QA work: they become the basis for test cases, they resolve ambiguity ('what exactly counts as success?'), and they gate acceptance in the review. QA should actively review stories against INVEST and push back when criteria are missing, vague, or untestable — for instance, 'the page should be fast' is not testable, whereas 'the search results load within 2 seconds for up to 1,000 results' is. Good acceptance criteria also cover negative and edge cases, not just the happy path, which is exactly where QA's perspective adds the most value during refinement.

🔑 Key Points:
  • User story format: As a <role>, I want <goal>, so that <benefit>
  • INVEST: Independent, Negotiable, Valuable, Estimable, Small, Testable — QA anchors on Testable
  • Acceptance criteria define 'done' from the user's view and become the basis for test cases
  • Reject vague/untestable criteria ('fast', 'user-friendly') — demand measurable conditions
  • Good criteria include negative and edge cases, not just the happy path
🌍 Real-World Example:

A story reads 'As a shopper, I want to apply a discount code so that I pay less.' QA adds acceptance criteria covering a valid code (discount applied), an expired code (clear error), an invalid code (clear error), and a code below the minimum order (rejected) — turning a happy-path-only story into a testable, complete one.

📎 Code Example:
Story: As a shopper, I want to apply a discount code
       so that I pay less at checkout.

Acceptance Criteria:
  AC1  Given a valid, active code,
       When I apply it,
       Then the discount is applied and the total updates.
  AC2  Given an expired code,
       When I apply it,
       Then I see "This code has expired" and the total is unchanged.
  AC3  Given an invalid code,
       When I apply it,
       Then I see "Invalid code" and the total is unchanged.
  AC4  Given an order below the code's minimum,
       When I apply it,
       Then the code is rejected with the minimum stated.

(INVEST check: Testable? Yes — each AC is a concrete, verifiable condition.)
🎯 Scenario-Based Interview Question:

Scenario: In refinement, a Product Owner presents a story: 'As a user, I want the dashboard to be fast and easy to use.' The developers are ready to estimate it. As QA, what's your concern and what do you do?