Checkout combinations: pairwise in nine tests
advanced Pairwise testing Challenge 8 of 10
A checkout page must work in every combination of browser, payment method and device. You cannot run all 27 combinations by hand on every release, and each of nine hidden bugs appears only for one particular pair of settings. Write at most nine tests that expose all of them.
Requirements
- Every combination of browser, payment method and device must complete the checkout, so the expected result of every test is
ok. - Use at most 9 tests.
- You are not told which pairs are broken, so choose tests that cover every pair of settings.
Expected output
At most 9 tests that cover every pair of settings and expose all 9 planted bugs.
Function under test
checkout(browser, payment, device) → outcome
browserone of chrome, firefox, safaripaymentone of card, paypal, applepaydeviceone of desktop, mobile, tablet
How your tests are checked
- ○Every expected value agrees with the specification
- ○Your tests expose all 9 planted bugs
- ○No more than 9 tests
The correct implementation is the oracle. A bug counts as caught when one of your valid tests gives a different result on the buggy copy than on the correct code.
testsMutation-tested in your browser
| # | browserchoice | paymentchoice | devicechoice | expected outcome | Remove |
|---|---|---|---|---|---|
| 1 |
1 test · limit 9
Ctrl/⌘ + Enter to check tests · your tests are saved in this browser
Results
Check your tests to see which planted bugs they catch.