Notes
The problem
Say you must check the ShopRung checkout on three browsers, with two kinds of account, on three screen sizes, with three coupon choices. Every combination is three times two times three times three: fifty four runs of the same flow. Add one more option with three values and it becomes one hundred and sixty two. Nobody runs that by hand every release. So most teams test a few setups by feel, and nobody knows what they missed.
- browser Chrome, Firefox, Safari 3
- account alice, new account 2
- screen desktop, tablet, phone 3
- coupon none, SAVE10, FLAT5 3
- all combinations: 3 x 2 x 3 x 3 = 54 runs
- add one more option → 162
The idea
Studies of real defects found a useful pattern. Most bugs are triggered by one setting alone, many by a combination of two settings, and only a few need three or more at once. Pairwise testing uses that. Instead of every combination, it makes sure every pair of values appears together in at least one run. Safari with a phone, a phone with flat five, Safari with flat five, and so on. Each run covers several pairs at once.
- studies of real defects: most are triggered by one setting, many by a pair, few need three or more
- so: make sure every PAIR of values appears in at least
- one run
- Safari + phone, phone + FLAT5, Safari + FLAT5 ... each once
The table
Here are nine runs instead of fifty four. Pick any two columns and any two values, and you will find a row with both. Safari and phone, row seven. A new account with flat five, row eight. A tablet with save ten, row two. Every pair is covered. What you give up is triples: Safari with a phone and flat five together is not in the table. That is the trade, and you make it knowingly.
# browser account screen coupon 1 Chrome alice desktop none 2 Chrome new tablet SAVE10 3 Chrome alice phone FLAT5 4 Firefox alice tablet FLAT5 5 Firefox new phone none 6 Firefox new desktop SAVE10 7 Safari alice phone SAVE10 8 Safari new desktop FLAT5 9 Safari alice tablet none
Constraints
Real options have constraints. In ShopRung, a guest has no cart, so a guest with save ten is impossible: rule account eight says the cart needs a login. Safari only runs on Apple devices. Writing these down matters, because an impossible row wastes a run and hides the pairs it was meant to cover. Pairwise tools let you write rules like: if the account is guest, then the coupon is none. They then build the table around them.
- a guest cannot apply a coupon (ACC-8: cart needs login)
- Safari only runs on Apple devices
- admin cannot place orders? (ask!)
- write constraints as rules: IF account = guest THEN coupon = none
Tools
For more than a few parameters, nobody builds the table by hand. Free generators do it: Microsoft's PICT tool, Python libraries like allpairspy, and many online generators. You list the parameters, their values and the constraints, and the tool returns a small set of rows. Most can also cover all triples instead of pairs, called strength three. That gives more rows, still far fewer than every combination, for features where mistakes are expensive.
- open-source generators: PICT (Microsoft), allpairspy (Python), many online tools
- input: parameters + values + constraints
- output: a small set of rows
- want triples? set strength 3 (more rows, still << all)
Where it fits
Know where pairwise fits. It is great for configurations: browsers, operating systems, screen sizes, feature flags, settings, and optional fields or parameters. It is the wrong tool for business rules like the coupon thresholds, which need boundaries and decision tables. A neat way to say it: pairwise picks where and under which settings to run a test, while the other techniques pick what to check in that test.
- good fit browsers x OS x screen feature flags, settings, form options, API params
- bad fit money rules (use boundaries and decision tables) known risky triples
- pairwise picks WHERE to run, other techniques pick WHAT
Error guessing
Now the second technique. Error guessing is experience based: you list the faults that are likely in this kind of software, then design tests to expose them. The guesses come from past bugs in this app, bugs in similar apps, the ways developers usually slip, and what real users actually do. It is not random clicking. A good guess is specific enough to write as a test case, and you keep the list and grow it after every release.
- an experience-based technique: list faults that are likely, then design tests to expose
- them
- sources of guesses: past bugs in this app bugs in similar apps how developers usually slip what users actually do
Guesses for a shop
Here is a starter list for any shop. Double click place order: do you get two orders? Press back after paying. Cancel the same order in two tabs. Type the coupon with spaces around it. Send quantities like two point five, minus one and ninety nine thousand. Search for a percent sign, an underscore, a quote and an emoji. Try names of fifty and fifty one characters. Change stock after adding to the cart. Let the login expire mid checkout. And open another customer's order id.
- double-click Place order
- Back button after paying
- two tabs: cancel in both coupon " save10 " with spaces
- quantity 2.5, -1, 99999
- search: %, _, ', emoji
- name of 50 and 51 chars
- stock changes after adding
- token expires mid-checkout
- another user's order id
Fault attacks
Error guesses can be organised into fault attacks, grouped by where faults live. Inputs: empty, huge, the wrong type, special characters. State: repeat an action, undo it, two users at once. Time: slow networks, timeouts, expiry and time zones. Data: zero, negative values, duplicates, and records that were deleted. Access: someone else's data. In the exploratory testing lab you will use this kind of list on ShopRung in mystery mode.
- inputs empty, huge, wrong type, special characters
- state repeat, undo, two users at once
- time slow network, timeout, expiry, time zones
- data zero, negative, duplicates, deleted
- access another user's data
Its limits
Error guessing finds bugs that no requirement mentions, which is its great strength. Its limit is that it depends on the tester. A junior tester has fewer guesses, and coverage is hard to measure. Teams fix this by keeping a shared list of error guesses, adding every bug that escaped to production, and pairing new testers with experienced ones. Over time the list becomes a valuable team asset.
- strength: finds bugs no requirement mentions
- limit: only as good as the tester's experience
- limit: hard to measure coverage
- fix: keep a shared list, add every escaped bug, pair juniors with seniors
Common mistakes
Common mistakes. Using pairwise for money rules, where boundaries matter more. Forgetting constraints and wasting rows on impossible combinations. Using plain pairs where a known triple is risky. Using error guessing instead of structured techniques rather than on top of them. Writing guesses too vague to repeat, like try weird inputs. And never adding new guesses after a bug escapes to production.
- pairwise on business rules
- forgetting constraints
- pairwise for safety-critical combos that need all triples
- error guessing instead of structured techniques
- guesses too vague to repeat
- never updating the guess list
Say it like this
A common interview question: we support five browsers and four operating systems, plus several settings, how do you test it? Say: I would not run every combination. I list the parameters and values, add the constraints, and generate an all pairs set with a tool, plus any combination we know is risky. Separately, I test the business rules with boundaries and decision tables, and I add error guesses from past bugs.
- "I would not run every combination. I list the parameters and values, add
- constraints, and generate an all-pairs set with a tool, adding any known risky
- combination. Separately I
- test the business rules with boundaries and add error
- guesses from past bugs."