5 Use Case Coverage - essenius/AcceptanceTesting GitHub Wiki

A typical way of describing a use case (taken from the Construx Professional Tester Boot Camp) is shown in the table below

Use Case #66 Place Order
Actor(s) Customer
Description A customer orders some set of books
Pre-conditions Known Customer, at least 1 known book, all book quantities are at least 1
Post-conditions One new Book Order has been created with date ordered = today, ship to address as specified, and status = placed. One new Book Order Line has been created for each specified book with quantity = number of copies requested
Priority Highest
Normal course Credit card payment and ship-to address = customer’s primary address
Alternative courses Pay with gift certificate
Pay with airline miles
Ship-to address is other than customers primary address
This order is a gift
Exceptions Credit card rejected, Insufficient miles in airline account
Special requirements Must be completed in under 60 seconds
Assumptions None

You can mechanically derive test cases from this specification and by doing so you achieve use case coverage. Positive tests are:

  • Normal course
  • Each alternative course
  • Combinations of alternative courses

Negative tests are:

  • Violate each precondition
  • Force each exception

Use case coverage can (and should) be combined with input domain coverage to reduce the level of incompleteness. The test cases derived from the use case example above are shown below.

Source Test Cases
Normal course A known customer buys 2 known books and pays by credit card and ship-to date is primary address
Alternative courses A customer buys 2 known books and
  • pays by gift certificate and ship-to date is primary address
  • pays with airline miles and ship-to date is primary address
  • pays by credit card and ship-to date is another address than the primary address
  • pays by credit card and ship-to date is primary address, and the order is a gift
Combinations of alternate courses
  • A known customer buys 2 known books and pays by gift certificate and ship-to date is another address and the order is a gift
  • .. many other combinations of the alternate courses
Negative test cases
  • An unknown customer buys 2 known books and pays by credit card and ship-to date is primary address
  • A known customer buys 1 unknown book and pays by credit card and ship-to date is primary address
  • A known customer buys known book with quantity 0 and pays by credit card and ship-to date is primary address
  • A known customer buys 2 known books and pays with invalid credit card and ship-to date is primary address
  • A known customer buys 2 known books and pays with airline miles while not having enough miles and ship-to date is primary address
⚠️ **GitHub.com Fallback** ⚠️