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.
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):
| Model | All combinations | Pairwise (2-wise) | 3-wise |
|---|---|---|---|
| 4 parameters × 3 values | 81 | 10 (minimum 9) | 38 for 5 parameters |
| 10 parameters × 2 values | 1,024 | 9 (minimum 6) | 16 for 8 parameters |
| 5 parameters × 4 values | 1,024 | 18 (minimum 16) | – |
| 13 parameters × 3 values | 1,594,323 | 19 | – |
| 10 parameters × 10 values | 10,000,000,000 | 153 | – |
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:
| Feature | PICT | This tool |
|---|---|---|
| Parameter line | Browser: Chrome, Firefox, Safari | Same (in “Paste a model as text”) |
| Conditional rule | IF [Browser] = "Safari" THEN [OS] = "macOS"; | Accepted as is, or without brackets, quotes and semicolon |
| Set membership | [OS] IN {"Linux", "macOS"}, NOT IN | Supported |
| Rule without IF | [Browser] <> "Edge"; must always hold | Same when written with [brackets]. Without brackets, Browser = Safari AND OS = Windows lists a combination to exclude. |
| OR, NOT, LIKE, > and <, comparing two parameters | Supported | Not supported (write one rule per alternative) |
| Strength | /o:3 command-line option | Coverage strength menu (2 or 3) |
Aliases (|), negative values (~), weights, sub-models, seeding files | Supported | Not 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.
Related Tools
All QA & Testing Tools →OpenAPI Validator & Viewer
Validate OpenAPI 3.x and Swagger 2.0 specs in YAML or JSON,...
HAR File Viewer & Analyzer
Open HAR files from browser DevTools to inspect every reques...
SOAP Message Viewer & Request Builder
Format and inspect SOAP 1.1 and 1.2 envelopes, read headers,...
Watermark on Image
Apply text or image watermark overlays to photos and graphic...
Meme Creator Online
Upload an image and place styled text anywhere to create mem...
Blur Face in Image
Automatically detect and blur faces to protect privacy in im...