Pairwise Test Generator

Generate pairwise (all-pairs) and n-wise test cases in your browser. Enter factors and values in a grid and exclude combinations with PICT constraints. Download the test set as CSV, TSV, JSON or JSON Lines.

About this tool

What is pairwise testing?

Testing every combination of inputs quickly becomes impossible: 5 devices × 2 operating systems × 3 browsers × 5 versions is already 150 cases. Pairwise testing (all-pairs testing) instead picks a small set of cases in which every pair of values from any two factors appears at least once. Many defects are caused by the interaction of just two settings, so this catches most of them with far fewer tests. For the example above, 25 cases cover every pair.

This tool builds such test sets (covering arrays) with the covertable library. You can also raise the strength to 3-wise or higher to cover every combination of three or more factors.

How to use

  1. In the input grid, enter a factor name in column A and its possible values in the cells to the right, one factor per row. To add rows or columns, click a row number or column letter and right-click it.
  2. Optionally write rules in Constraints in PICT to exclude impossible combinations.
  3. Set Factors to be covered: 2 for pairwise, 3 for 3-wise, and so on (up to the number of factors).
  4. Click Generate. The progress bar shows how many of the required combinations are covered so far.
  5. Review the result grid, choose a File format, optionally Add a header row, and click Download.

Example input

ABCDEF
machineiPhonePixelXPERIAZenFoneGalaxy
osiOSAndroid
browserFireFoxChromeSafari
version7891011

Constraints

Constraints use PICT syntax. Each rule starts with IF, ends with ;, refers to factors as [name], and writes text values in double quotes.

SyntaxMeaning
=, <>Equal, not equal
>, <, >=, <=Numeric comparison
IN {"a", "b"}Value is one of a set
LIKE "X*"Wildcard match (* any text, ? one character)
AND, OR, NOT, ( )Combine conditions
IF … THEN … ELSE …;Conditional rule

Syntax errors are shown as you type, and references to factors that do not exist are reported when you click Generate.

Features

  • Pairwise (2-wise) up to n-wise coverage
  • PICT-compatible constraint rules with syntax highlighting
  • Stable output: the same input gives the same result; check Always randomize. to get a different set each time
  • Warning when constraints make some combinations impossible, with the share that could be covered
  • Export to CSV, TSV, JSON(Double array), JSON(Object array) and JSONL, with date and duration formats for spreadsheet values
  • Generation runs in the background in small batches, so the page stays responsive

FAQ

How many test cases will I get?

It depends on the factors, especially the two with the most values: pairwise testing needs at least (values of the largest factor) × (values of the second largest) cases. The generator uses a greedy algorithm, so the result is small but not always the theoretical minimum.

Is this compatible with Microsoft PICT?

The constraint syntax follows PICT, so most PICT constraint files work. The model itself is entered in the grid instead of a text file, and PICT-only features such as sub-models, value weights and negative values are not supported. Every rule must start with IF, and # comment lines are not accepted.

Why do I get "Only N% of the combinations could be covered"?

Your constraints rule out some value pairs entirely, so they can never appear. Check that the rules are what you intended.

Is my data sent to a server?

No. Generation runs entirely in your browser.