QA & Testing Tools

Pairwise Test Case Generator

Enter your test parameters and their values, add rules for combinations that cannot happen, and get a small set of test cases that still covers every pair (or triple) of values. Coverage is re-checked independently after generation.

Private by design: anything you enter is processed in your browser only. It is never uploaded to or logged on our servers. Share links contain the model (parameters, rules, strength and seed), so the recipient regenerates the identical suite.

Parameters

Paste a model as text

One Name: value1, value2 per line (PICT style). Lines with =, <> or IF are read as rules. Importing replaces the current parameters and rules.

A = x AND B = y excludes that combination (PICT-style [A] <> "x"; must always hold). IF … THEN … requires the THEN part whenever the IF part holds. Operators: =, <>, !=, IN {a, b}, NOT IN {a, b}, joined with AND.

The same model and seed always give the same suite. Try a few seeds if you want a different arrangement.

Test cases
–
All combinations
–
Reduction
–
Pair coverage
–

Add parameters to generate test cases.

About pairwise (all-pairs) testing

Configuration testing explodes quickly: four browsers, three operating systems, three payment methods, two user types and three languages already give 216 combinations, and every new option multiplies the total. Pairwise testing (also called all-pairs testing, a form of combinatorial interaction testing) picks a much smaller set of test cases in which every pair of values from any two parameters appears together at least once. Research on real-world failures, notably by NIST, found that most defects are triggered by a single parameter or by the interaction of two, so covering all pairs catches a large share of bugs at a fraction of the cost.

This generator uses a greedy, AETG-style algorithm. It repeatedly builds several candidate test cases, each starting from a value combination that is not yet covered and filling the remaining parameters with the values that cover the most new pairs, and keeps the best one. A seeded random number generator breaks ties, so the same model and seed always produce the same suite, and the best of several seeded runs is kept for small models. After generation the tool enumerates every valid pair again and checks it against the output, so the coverage figure you see is measured, not assumed.

Rules describe combinations that are impossible or meaningless, such as Safari on Linux or a guest checkout with a stored bank account. Pairs that no valid test can contain are reported as excluded instead of being forced into a test case. 3-wise coverage guarantees every triple of values and is useful when three settings are known to interact (for example locale, currency and tax rules); expect the suite to be several times larger.

Pairwise output works well as the Examples table of a Gherkin Scenario Outline — tidy it with the Gherkin formatter — and as a test matrix for parameterised unit tests. Fill each case with realistic inputs from the mock data generator, and convert the CSV export to JSON or YAML fixtures with the data format converter.

Reference Guide

How much pairwise saves (counts produced by this generator with seed 1; the minimum is the best possible size where it is known):

ModelAll combinationsPairwise (2-wise)3-wise
4 parameters × 3 values8110 (minimum 9)38 for 5 parameters
10 parameters × 2 values1,0249 (minimum 6)16 for 8 parameters
5 parameters × 4 values1,02418 (minimum 16)–
13 parameters × 3 values1,594,32319–
10 parameters × 10 values10,000,000,000153–

A pairwise suite can never be smaller than the product of the two largest value counts (two parameters with 10 values each need at least 100 cases), so split or reduce parameters with many values first.

When not to rely on pairwise alone: safety- or money-critical logic where a missed combination is unacceptable; known interactions of three or more parameters (raise the strength or add explicit tests); behaviour that depends on the order of steps or on state rather than on a set of inputs; and continuous ranges that you have not yet reduced to classes with equivalence partitioning and boundary values. Pairwise picks which combinations to run; it does not decide expected results.

Comparison with Microsoft PICT model syntax:

FeaturePICTThis tool
Parameter lineBrowser: Chrome, Firefox, SafariSame (in “Paste a model as text”)
Conditional ruleIF [Browser] = "Safari" THEN [OS] = "macOS";Accepted as is, or without brackets, quotes and semicolon
Set membership[OS] IN {"Linux", "macOS"}, NOT INSupported
Rule without IF[Browser] <> "Edge"; must always holdSame when written with [brackets]. Without brackets, Browser = Safari AND OS = Windows lists a combination to exclude.
OR, NOT, LIKE, > and <, comparing two parametersSupportedNot supported (write one rule per alternative)
Strength/o:3 command-line optionCoverage strength menu (2 or 3)
Aliases (|), negative values (~), weights, sub-models, seeding filesSupportedNot supported

Both tools use greedy heuristics, so the same model can produce a different number of cases in each.

Example input

Browser: Chrome, Firefox, Safari, Edge
OS: Windows, macOS, Linux
Payment: Card, PayPal, Bank transfer
User: Guest, Registered
Language: English, German, Japanese

IF Browser = Safari THEN OS = macOS
User = Guest AND Payment = Bank transfer

This sample loads automatically when you open the tool. Use Load Sample to bring it back.

Frequently Asked Questions

Pairwise (all-pairs) testing picks a small set of test cases in which every combination of values for every pair of parameters appears at least once. Most defects are triggered by one or two interacting parameters, so this catches many bugs with far fewer tests.

Far fewer than the full combination count. The tool shows the exact number it generated next to the full Cartesian product and confirms that every pair is covered.

When a defect needs three or more specific values together, or for safety-critical combinations. Add those cases explicitly or use higher-strength (3-wise) coverage.