Skip to main content

Search...

Pairwise Testing: Combinatorial Testing in Practice

27 combinations, but budget for only nine tests? Pairwise testing shows which nine they have to be, and why those nine still find most interaction defects.

Expert reviewed by Richard Seidl · Jul 31, 2026

What Is Pairwise Testing?

NIST/NASA Range of Failure Causes, Pairwise TestingRange chart of the NIST and NASA findings on failure causes in nine systems studied (Kuhn/Wallace/Gallo 2004): single values trigger between 29 and 82 percent of failures depending on the system, pair interactions between 47 and 97 percent, three-way interactions between 89 and 99 percent. The study reports no fixed curve; the range narrows as the interaction level rises, while the biggest gain consistently sits at the step from single values to pairs.0%25%50%75%100%82%29%Single values (t=1)97%47%Pair interactions (t=2)99%89%Three-way interactions(t=3)biggest gainKuhn/Wallace/Gallo 2004, nine systems studied (medical device, browsers, HTTP server, distributed database)Values vary widely by system; the authors explicitly decline to generalise into a single curve.

Swipe right or use the arrow keys to see the full graphic.

Pairwise testing (the most important form of combinatorial testing) is a test technique that selects, out of all possible value combinations of several parameters, a small test set in which every pairing of two parameter values occurs at least once. Instead of working through the complete Cartesian product, the interplay of every two parameters is checked, and guaranteed so for every pair. The tools optimize hard, but they do not reliably hit the theoretical minimum; finding it is computationally hard. What matters is the guarantee, not the last row saved.

Why this holds up has been studied empirically, though the picture is less smooth than it is often presented. In 2004, Kuhn, Wallace and Gallo analysed the failure databases of nine real systems for NIST and NASA, from a medical embedded device via web browsers and an HTTP server to a distributed scientific database. The shared finding: almost all failures hang on a small number of interacting parameters.

The numbers behind that finding, however, spread widely. Single parameter values triggered between 29 and 82 percent of the failures, depending on the system. Add pair interactions and you land between 47 and 97 percent, with three-way interactions between 89 and 99 percent. The study reports no fixed curve anywhere, and the authors state explicitly that a generalization would require considerably more data sets.

For practice, a clear conclusion remains: the jump from single values to pairs delivers by far the largest gain in every system studied, the step to three-way interactions considerably less. Where your own numbers land depends on the system. That pairwise is the most economical entry point holds across all nine.

Combinatorial testing counts among the data-based test design techniques. Beyond the pair it generalises: with t-way coverage, every tuple of t parameter values occurs at least once; pairwise is the case t equals 2.

When Is the Technique a Good Fit?

Wherever several parameters with clearly defined values interact and exhaustive testing would be uneconomical. Typical fields: configuration testing across browser, operating system, resolution and language; business rules with several factors; interfaces with many optional parameters; systematic authorisation testing.

The precondition is that the input space can be described as a finite list of parameters with finitely many values. Continuous value ranges are first reduced to a few representatives via equivalence partitioning. The two techniques interlock: equivalence partitioning goes deep into individual partitions and their boundaries, combinatorial testing goes broad across several parameters.

The savings grow with the number of parameters. With two parameters there is nothing to gain; the full combination is small anyway. From three parameters with several values each, the difference becomes noticeable; from four parameters, a factor of five to ten often lies between the full combination and the pairwise suite.

The Procedure in Five Steps

  1. Identify the parameters. Which input parameters influence the behaviour together?
  2. Determine the values per parameter. Reduce continuous ranges beforehand via equivalence partitions.
  3. Choose the interaction level. Pairwise (t equals 2) is the norm; with a high risk level or known three-way dependencies, t equals 3.
  4. Generate the test set. A tool computes the optimised test set that covers all pairs.
  5. Execute and evaluate. If failures cluster around a particular parameter pair, that points to an interaction defect.

A Compact Example

Pairwise Matrix, Car Rental BookingThree three-by-three pairwise matrices for the car rental example, stacked one below the other, with the parameters vehicle class (Compact, Estate, SUV), payment method (Credit card, PayPal, Invoice) and pickup station (Airport, Railway station, City centre). Each of the three possible parameter pairings is fully covered: every cell of every matrix carries exactly one of the nine test case numbers TC-1 to TC-9. Contrasted with the full combination of 27 possible combinations of all three parameters together.Vehicle Class × Payment MethodCredit cardPayPalInvoiceCompactEstateSUVTC-1TC-2TC-3TC-4TC-5TC-6TC-7TC-8TC-9Payment Method × Pickup StationAirportRailway stationCity centreCredit cardPayPalInvoiceTC-1TC-4TC-7TC-8TC-2TC-5TC-6TC-9TC-3Vehicle Class × Pickup StationAirportRailway stationCity centreCompactEstateSUVTC-1TC-2TC-3TC-6TC-4TC-5TC-8TC-9TC-727 possible combinations (3 × 3 × 3). Pairwise covers them all with just 9 test cases.

Swipe right or use the arrow keys to see the full graphic.

The booking flow of a car rental portal has three parameters with three values each: vehicle class (compact, estate, SUV), payment method (credit card, PayPal, invoice) and pickup station (airport, railway station, city centre). The full combination would yield 3 × 3 × 3 = 27 test cases. A pairwise-optimised suite manages with nine:

TCVehicle classPayment methodPickup station
1CompactCredit cardAirport
2CompactPayPalRailway station
3CompactInvoiceCity centre
4EstateCredit cardRailway station
5EstatePayPalCity centre
6EstateInvoiceAirport
7SUVCredit cardCity centre
8SUVPayPalAirport
9SUVInvoiceRailway station

Counting is worth it: every vehicle class meets every payment method exactly once, every payment method every station, every class every station. All 27 value pairs are covered, with a third of the full combination.

Suppose TC 6 fails in the test run: for payment by invoice with pickup at the airport, the credit check that invoice payment requires never runs, because the airport station uses its own, older checkout path. That is an interaction of exactly two values (invoice and airport), independent of the vehicle class. The pairwise suite finds such pair defects not by luck but by construction, because the pair occurs in at least one test case.

Coverage and Success Criteria

Test Case Counts Compared, Pairwise TestingBar comparison of the three test case counts in the car rental example: full combination 27 test cases, pairwise coverage 9 test cases, base choice coverage 7 test cases.27Full combination9Pairwise suite7Base choice coverageCar rental example: 3 parameters × 3 values each

Swipe right or use the arrow keys to see the full graphic.

Two criteria complement each other in practice. Base choice coverage starts with a base test case built from the most representative values and then varies, per parameter, each further value one at a time; in the car rental example that yields 1 + (2 + 2 + 2) = 7 test cases. It ensures that every value occurs once, but says nothing about interactions. Pairwise coverage, by contrast, measures the share of covered value pairs out of all possible ones; the target is 100 percent.

What the levels mean in concrete terms, the example shows: three test cases are enough to show all nine individual values once, but they cover at most nine of the 27 pairs, a third. The pairwise suite with nine test cases reaches all 27 pairs and, along the way, nine of the 27 triple combinations. Whoever wants all triple combinations ends up, with three parameters, at the full combination, because 3-way and full combination coincide here. A proven rule of thumb: pairwise as the standard, plus targeted extra tests for individual combinations with particular risk.

Strengths and Limits

The strength is plain to see: guaranteed pair coverage at a fraction of the effort, well suited to automation, and the parameter model can be reused across releases. When a fourth vehicle class arrives, the model gains one value and the suite is regenerated, instead of dragging test cases along by hand.

Three limits come with it. First, pairwise finds no defects that arise exclusively from the interplay of three or more parameters; known three-way dependencies need t equals 3 or targeted additions. Second, constraints, meaning inadmissible value combinations (say: no SUV pickup at the railway station), demand tool support, otherwise the suite contains tests that cannot be executed. Third, pair coverage is only as good as the chosen representatives; badly cut equivalence partitions stay bad, however cleverly you combine them.

Tools take over the computation: ACTS (free, maintained by NIST), PICT (free, from Microsoft) or Hexawise (commercial). Constructing pairwise suites by hand is nowadays only interesting as a finger exercise.

Equivalence partitioning does the groundwork: it forms the partitions per parameter whose representatives combinatorial testing then connects. When the combinations trigger clear business rules, decision table testing complements the picture, because it makes every rule explicit. The page test design techniques gives an overview of all eleven techniques.

Frequently Asked Questions

Pairwise testing is a combinatorial test technique in which every pairing of two parameter values occurs in at least one test case, without testing all combinations of all parameters. The 27 possible combinations of three parameters with three values each become nine test cases that still find the majority of interaction defects.

A study by Kuhn, Wallace and Gallo (NIST/NASA, 2004) of nine real systems shows that most defects in multi-parameter systems arise from the interplay of few parameters. Single parameter values triggered between 29 and 82 percent of the failures depending on the system, pair interactions brought the cumulative share to between 47 and 97 percent, three-way interactions to between 89 and 99 percent. The largest gain in every system studied comes from the step from single values to pairs; each further level brings diminishing returns at rising cost.

The full combination tests the complete Cartesian product of all parameter values, which for three parameters with three values each means 27 test cases. Pairwise testing selects a small set from it in which every value pair of two parameters occurs at least once, nine test cases in the same example. What is guaranteed is the pair coverage, not the theoretical minimum number of test cases. Defects that only arise from three or more parameters together are not guaranteed to be found by pairwise, though.

Established tools are ACTS (free, maintained by NIST), PICT (free, from Microsoft) and Hexawise (commercial). They compute optimised test sets from parameters and values, support constraints for inadmissible combinations, and can mix pairwise with higher-order coverage.

From about three parameters with several values each, the effect becomes noticeable, from four parameters dramatic. Typical use cases are configuration tests (browser, operating system, language), business rules with several factors and interfaces with many optional parameters. With only two parameters, the full combination is usually fine.

Base choice coverage picks one representative base value per parameter and forms a base test case from them. Then, for each parameter, every further value is varied once while the remaining parameters stay at their base value. It guarantees that every parameter value occurs once but does not check interactions systematically.

Build the base first

Combinatorial testing rests on equivalence partitioning and solid test design craft. That base is exactly what you build in the ISTQB Foundation Level, hands-on and systematic.