Black Box · Specification-Based

Use Case Testing

Derive test cases from use case flows. Test what real users actually do — the happy path, alternate routes, and the things that go wrong.

Junior Senior ISTQB CTFL v4.0 — 4.2.5

What it is

Use case testing treats the system from the user’s perspective. A use case describes a goal-driven interaction: who is doing it, what they want, and the sequence of steps to get there. Test cases are derived directly from these flows.

This technique is particularly valuable for integration and system testing — it tests how components interact to deliver user value, not just whether individual functions work.

The three flows

  • Basic flow (happy path) — the most common, successful path through the use case. Test this first.
  • Alternate flows — valid variations. A user pays with a different payment method; they log in via SSO instead of email/password.
  • Exception flows — things that go wrong. Invalid data, timeout, payment declined, system unavailable. These flows matter as much as the happy path.

Worked example: checkout flow

Use case: complete online checkout
Flow typeScenarioTest focus
Basic flowUser adds item, enters card details, completes purchaseOrder confirmed, stock decremented, email sent
AlternateUser pays with saved cardPre-filled payment, one-click confirm
AlternateUser applies discount codeTotal recalculated, code validated
ExceptionCard declinedError message shown, order NOT created, no charge
ExceptionItem goes out of stock during checkoutUser informed, offered alternatives
ExceptionSession times out mid-checkoutCart preserved, user returned to checkout on login

User stories vs use cases

In Agile teams, use cases are often replaced by user stories. The technique is the same — derive tests from the story’s acceptance criteria, happy path, and edge cases. ISTQB calls this user story testing, and it’s covered in the Agile Tester extension (CTFL-AT).

Good practice: for every user story, write at least one test for the basic flow, one for the most important alternate flow, and one for the most dangerous exception flow. Three tests minimum, derived directly from the story.

ISTQB mapping

ISTQB reference
RefTopicLevel
4.2.5Use Case TestingCTFL Foundation
CTFL-ATUser Story Testing (Agile extension)Foundation Agile

Try It — Classify the flows

A NZ government services portal lets citizens renew their driver licence online. Six test scenarios are listed below. Classify each as Basic flow, Alternate flow, or Exception flow.

ScenarioYour classification
User logs in with RealMe, passes vision check, pays $49.10, licence renewed successfully
User logs in with RealMe, but their licence has already expired more than 1 year ago — portal blocks renewal and directs them to NZTA
User pays using credit card instead of internet banking
Payment gateway times out — user session preserved, error displayed, no charge made
User has an address outside Auckland, Wellington, and Christchurch — selects NZ Post rural delivery option
RealMe identity verification fails — user cannot proceed, shown support contact