SELF-GUIDED BA PRACTICE Selected editions available · Access after confirmed paymentCheck editions ↗

Testing & Delivery

How to Write Test Cases From Acceptance Criteria: Positive, Negative and Boundary Tests

Testing & Delivery · Published · Updated · 11 min read · By BA Mentorship Editorial (AI-written)

Part of our guide to business analyst skills.

Why acceptance criteria are the best source for test cases

Acceptance criteria describe what must be true for a story to be accepted. A test case describes how someone will check that it is true. When you write test cases from acceptance criteria, you are not inventing new requirements. You are turning agreed conditions into steps that a tester or business user can follow and judge as pass or fail.

This matters most in UAT. Business users have limited time, and they need tests written in their language, using situations they recognise. If the criteria were written well (see How to Write User Stories), most of the test design is already done. Your job is to make each criterion concrete, then add the tests the criteria imply but do not spell out: negative tests and boundary tests.

Test design is also one of the clearest ways to show analytical thinking. It sits alongside requirements, modelling and communication in the core business analyst skills that delivery teams expect from a BA.

Anatomy of a test case

Templates differ between teams, but almost every useful test case has the same fields. If a field is missing, someone will have to guess, and guessing is how tests pass when they should fail.

  • Test case ID: a unique, stable reference such as TC-12-03, so links never break.
  • Title: one behaviour in plain words, for example 'Error shown when email is missing'.
  • Linked requirement: the story ID and the criterion number it proves.
  • Preconditions: what must already be true before you start, such as the user role or existing records.
  • Test data: the exact values to enter or use.
  • Steps: numbered actions, one action per step.
  • Expected result: the observable outcome, such as a message, a value or a screen.
  • Actual result and status: filled in during execution as pass, fail or blocked.
  • Defect reference: a link to the bug report if the test failed.

Keep each test case focused on one behaviour. If a test checks five things and fails, nobody knows which one broke. A simple rule: if the title needs the word 'and', think about splitting it.

Teams store test cases in spreadsheets, test management tools or as linked items in a tracker. The fields matter more than the tool. If your team works in a Jira-style tool, Jira for Business Analysts explains how tickets and links fit together.

How to turn acceptance criteria into test cases, step by step

Criteria written in Given/When/Then format make the mapping almost mechanical. The Given becomes your preconditions and test data. The When becomes your steps. The Then becomes your expected result. If you need a refresher on the format, see the Gherkin glossary entry.

From acceptance criterion to test cases6 steps in order: 1. Read the criterion: Check it is testable: one clear starting state, one action, one observable result. 2. Map Given to preconditions: Turn the starting state into setup steps and the exact test data you need. 3. Map When to steps: Write the user action as numbered steps that anyone on the team can follow. 4. Map Then to expected results: Write the outcome as a specific fact: the screen, message or value the tester should see. 5. Add negative and boundary tests: Ask what must not happen, and test just below, at and just above each limit. 6. Link and review: Record the story and criterion ID, then review coverage with QA and the product owner.1Read the criterionCheck it is testable: one clear startingstate, one action, one observable result.2Map Given to preconditionsTurn the starting state into setup stepsand the exact test data you need.3Map When to stepsWrite the user action as numbered stepsthat anyone on the team can follow.4Map Then to expected resultsWrite the outcome as a specific fact: thescreen, message or value the testershould see.5Add negative and boundary testsAsk what must not happen, and test justbelow, at and just above each limit.6Link and reviewRecord the story and criterion ID, thenreview coverage with QA and the productowner.
Each part of a Given/When/Then criterion maps to a field in the test case. Negative and boundary tests come after the positive test.
Diagram in words
  • 1. Read the criterion: Check it is testable: one clear starting state, one action, one observable result.
  • 2. Map Given to preconditions: Turn the starting state into setup steps and the exact test data you need.
  • 3. Map When to steps: Write the user action as numbered steps that anyone on the team can follow.
  • 4. Map Then to expected results: Write the outcome as a specific fact: the screen, message or value the tester should see.
  • 5. Add negative and boundary tests: Ask what must not happen, and test just below, at and just above each limit.
  • 6. Link and review: Record the story and criterion ID, then review coverage with QA and the product owner.
  1. Check each criterion is testable. Look for vague words such as 'fast', 'easy' or 'correct'. Ask the product owner to replace them with something observable before you write tests.
  2. Write one positive test per scenario. Use realistic data that clearly meets the Given. This proves the main path works.
  3. Turn the Given into preconditions and data. Name the exact user, account or record, so two testers get the same result.
  4. Turn the When into numbered steps. One action per step, written from the user's point of view.
  5. Turn the Then into expected results. Be specific: which screen, which message text, which value.
  6. Add negative tests. For each criterion, ask what must not happen, and what happens when input is wrong, missing or out of order.
  7. Add boundary tests. For every limit in the criteria, test just below, exactly at and just above it.
  8. Link every test to its criterion and review coverage. Every criterion needs at least one test, and every test needs a criterion.

Negative and boundary tests: where defects usually hide

Positive tests prove the system does what it should when everything goes right. Real users do not always go right. They leave fields empty, press back, use the wrong account and type values nobody expected. Negative and boundary tests check those situations.

Negative tests

A negative test checks that the system handles a bad or unexpected situation safely. It often proves that something does not happen. Good sources of negative tests are:

  • Missing or blank input in a required field.
  • Input in the wrong format, such as letters in a phone number.
  • A user without permission trying the action.
  • Steps done out of order, or repeated twice.
  • The opposite of a criterion: if a fee is added when a total drops, check it is not added when the total stays high.

Boundary tests

Wherever a rule has a limit, developers have to choose between 'greater than' and 'greater than or equal to'. That choice is a common source of defects. So for each limit, test three values: just below, exactly at and just above. If a password must be between eight and twenty characters, test seven, eight, twenty and twenty-one characters.

Equivalence groups keep the test count sensible

You cannot test every possible value. Instead, group values that should behave the same way and pick one from each group, plus the boundaries between groups. For a minimum order rule, that means one value clearly below, one clearly above, and the three boundary values.

Worked example: free delivery at Lumen Pantry

Lumen Pantry is a fictional online grocery store. Story US-31 says: as a customer, I want free delivery when my basket is large enough, so that I am encouraged to buy more in one order. The product owner agreed three acceptance criteria.

GHERKIN

Feature: Free delivery at checkout (US-31)

  Scenario: AC1 Basket qualifies for free delivery
    Given my basket total is ₹500 or more
    When I open the checkout page
    Then the delivery fee is ₹0
    And I see the label 'Free delivery'

  Scenario: AC2 Basket is below the threshold
    Given my basket total is below ₹500
    When I open the checkout page
    Then the delivery fee is ₹40
    And I see how much more I need to add for free delivery

  Scenario: AC3 Basket drops below the threshold
    Given my basket qualified for free delivery
    When I remove items and the total falls below ₹500
    Then the ₹40 delivery fee is added before payment

The BA started with one positive test per criterion, then added boundary tests around ₹500 and one negative test for AC3. The final set has seven test cases, numbered in the order they appear below:

  • TC-31-01 (AC1, positive): basket ₹650. Expected: fee ₹0 and the 'Free delivery' label.
  • TC-31-02 (AC2, boundary just below): basket ₹499. Expected: fee ₹40 and the message 'Add ₹1 more for free delivery'.
  • TC-31-03 (AC1, boundary at the limit): basket ₹500. Expected: fee ₹0 and the 'Free delivery' label.
  • TC-31-04 (AC1, boundary just above): basket ₹501. Expected: fee ₹0 and the 'Free delivery' label.
  • TC-31-05 (AC2, positive): basket ₹300. Expected: fee ₹40 and the message 'Add ₹200 more for free delivery'.
  • TC-31-06 (AC3, positive): basket ₹520, remove a ₹50 item. Expected: total ₹470, fee ₹40, amount to pay ₹510.
  • TC-31-07 (AC3, negative): basket ₹600, remove a ₹50 item. Expected: total ₹550 and the fee stays ₹0.

Coverage check: AC1 has three tests (TC-31-01, TC-31-03, TC-31-04). AC2 has two (TC-31-02, TC-31-05). AC3 has two (TC-31-06, TC-31-07). Three plus two plus two makes seven, and every test points to exactly one criterion.

Boundary tests as a scenario outline

The three boundary tests share the same steps, so the BA wrote them as one scenario outline. The Examples table includes a test ID column, and its rows run in the same order as the IDs: ₹499 is TC-31-02, ₹500 is TC-31-03 and ₹501 is TC-31-04. No reordering is needed.

GHERKIN

Scenario Outline: Delivery fee at the free delivery threshold
  Given my basket total is <total>
  When I open the checkout page
  Then the delivery fee shown is <fee>
  And the message shown is '<message>'

  Examples:
    | test_id  | total | fee | message                       |
    | TC-31-02 | ₹499  | ₹40 | Add ₹1 more for free delivery |
    | TC-31-03 | ₹500  | ₹0  | Free delivery                 |
    | TC-31-04 | ₹501  | ₹0  | Free delivery                 |

One test case, field by field

Test case TC-31-06 for US-31, AC3

Title: Delivery fee is added back when basket drops below ₹5001

Traces to: US-31, AC32

Precondition: customer is logged in with a basket worth ₹5203

Test data: remove 1 bottle of olive oil priced ₹50

Step 1: Open checkout and confirm the fee shows ₹0

Step 2: Return to the basket and remove the olive oil4

Step 3: Open checkout again

Expected: basket total ₹470, delivery fee ₹40, amount to pay ₹5105

Expected: message reads 'Add ₹30 more for free delivery'

Actual result / Status / Defect link: completed during UAT6

  1. One behaviour per title. The title names a single behaviour, so a failure points straight at the problem.
  2. Traceability. The story and criterion ID let anyone find this test from the requirement, and the requirement from this test.
  3. Precondition from the Given. AC3 says the basket already qualified. ₹520 is above ₹500, and removing ₹50 takes it below.
  4. Step from the When. The When in AC3 is removing items. This step does exactly that, in user language.
  5. Expected result from the Then. ₹520 minus ₹50 is ₹470. ₹470 plus the ₹40 fee is ₹510. Every value is stated so the tester can compare exactly.
  6. Space for evidence. Leave these fields empty at design time. Testers fill them in and attach a screenshot or defect link.
TC-31-06 written out in full. Each part comes straight from AC3.

Finding the missing tests

Lumen Pantry, a fictional online grocery store, during test design for story US-31 the week before UAT.

  1. You The BA learner

    I have one test for each criterion. Is that enough for UAT?

  2. Nadia Business analyst

    It proves the happy path. But what happens at exactly ₹500? The criterion says 'or more'.

  3. Riya QA tester

    That is where I usually find bugs. Someone codes 'greater than' instead of 'greater than or equal to'.

  4. You The BA learner

    So I add ₹499, ₹500 and ₹501 as boundary tests.

  5. Nadia Business analyst

    Yes. And for AC3, test the opposite too: remove an item but stay above ₹500. The fee must not appear.

  6. Riya QA tester

    What about coupons? If a ₹100 coupon takes ₹550 down to ₹450, is delivery still free?

  7. Nadia Business analyst

    The criteria do not say. We log it as a question for Helena and add a criterion if she decides. We do not guess.

The people and the company in this scene are fictional.

A short review turns three happy-path tests into a fuller set and surfaces an open question.

The coupon question became a new criterion, AC4, after the sponsor decided that delivery is judged on the total after discounts. That is a normal outcome: test design often exposes gaps in requirements, and finding them before UAT is much cheaper than finding them after go-live.

Linking test cases to requirements

A test case without a link to a requirement is hard to justify, and a requirement without a test is a risk nobody is checking. Traceability solves both problems. The usual tool is a requirements traceability matrix (RTM): a table where each row is a requirement or criterion, and the columns show its linked tests, their status and any open defects.

  • Forward coverage: every criterion links to at least one test. A criterion with no test is untested scope.
  • Backward coverage: every test links to a criterion. A test with no criterion either reveals a missing requirement or is testing something nobody asked for.
  • Status roll-up: when all tests for a criterion pass, the criterion is ready for sign-off. If one fails, the defect is linked so everyone can see why.

Use stable IDs. If you renumber tests halfway through, every link in the matrix breaks. Add new tests at the end of the sequence instead. To practise building a matrix and running a small UAT cycle, try the Traceability Matrix and UAT exercise.

Common mistakes when writing test cases from acceptance criteria

Vague expected results

'System works correctly' cannot fail, so it proves nothing. Write the exact message, value or screen the tester should see.

Only testing the happy path

One positive test per criterion feels complete, but most defects live at limits and in bad input. Add boundary and negative tests for every rule that has a limit or a condition.

Guessing when the criteria are silent

If you find a case the criteria do not cover, do not invent the expected result. Log it as a question with an owner. Guessing hides a requirements gap that will reappear later as an argument.

Long tests that check many things

A twenty-step test that covers login, search, basket and payment is hard to run and harder to debug. Split it into focused tests, each linked to its own criterion.

Writing in developer language for business testers

UAT testers are business users. Use screen names and business terms they know, not database fields or internal codes.

Good and risky test design habits

Good habit

  • Write expected results as observable facts, such as the exact message text.
  • Test the edges of every rule: just below, at and just above each limit.
  • Ask the product owner when a criterion is silent on a case.
  • Keep test IDs stable so links in the traceability matrix stay valid.

Risky habit

  • Write 'system works correctly' as an expected result.
  • Combine several behaviours into one long test.
  • Invent the expected result when the criteria do not say.
  • Leave tests unlinked because the story seems obvious.
Small habits decide whether your test cases catch defects or only confirm the obvious.

Checklist before you hand test cases to UAT testers

Test case readiness checklist

  • Every acceptance criterion has at least one positive test.
  • Every limit has tests just below, exactly at and just above it.
  • Each criterion has at least one negative test for wrong, missing or out-of-order input.
  • Each test case checks one behaviour and has a clear title.
  • Preconditions and test data are specific enough for two testers to get the same result.
  • Expected results name the exact screen, message or value.
  • Every test links to a story and criterion ID, and every criterion links to its tests.
  • Open questions found during test design are logged with an owner, not guessed.
Run through this list before UAT starts. Any unticked item is a gap to fix or a question to raise.

Walk through the set with the QA tester and one business user before UAT. Ten minutes of review often finds a missing boundary or a confusing step, and it gives testers confidence that the tests reflect how they really work.

Silent clip, about 19 seconds. BA Lab screen recording: a Jira-style story and a Confluence-style requirements page. All data in it is fictional.

Frequently asked questions

How many test cases should one acceptance criterion have?

There is no fixed number. Most criteria need one positive test, plus boundary tests for any limit and at least one negative test. A simple criterion might need two tests, while one with a numeric limit usually needs four or five. Aim for coverage of every behaviour, not a target count.

Should the business analyst or the QA tester write the test cases?

It depends on the team. Often QA writes system test cases and the BA writes or reviews UAT test cases, because the BA knows the business rules and the users. Even when QA writes them, the BA should review them against the acceptance criteria to confirm nothing is missing or misread.

What if the acceptance criteria are not written in Given/When/Then format?

You can still use the same thinking. Identify the starting situation, the action and the expected outcome in each criterion, then map them to preconditions, steps and expected results. If a criterion has no clear outcome, ask the product owner to clarify it before you write tests.

What is the difference between a test scenario and a test case?

A test scenario is a short description of something to check, such as 'customer removes items below the free delivery limit'. A test case is the detailed version: preconditions, exact data, numbered steps and expected results. One scenario usually produces several test cases.

Can I write test cases before the feature is built?

Yes, and it is a good habit. Writing tests early exposes vague or missing criteria while they are still cheap to fix. You may need to adjust screen names or steps once the build is ready, but the expected results should come from the criteria, not from what the system happens to do.

This article was written by an AI system and published automatically after automated accuracy, safety and quality checks. All companies, people and numbers in the examples are fictional. BA Mentorship does not issue professional certifications and cannot guarantee any job or interview outcome. Spot an error? Email our support team and we will check and correct it.

Key terms in this article

Browse the full glossary

CHECK BEFORE CONTINUING

Keep your work safe