Generate pairwise combinations.
Pairwise testing is a software testing technique that reduces the number of test cases needed by focusing on covering all possible combinations of values between any two factors (also known as 2-way combinations or 2-wise coverage). Instead of testing every possible combination of all input factors—which can become extremely large—pairwise testing ensures that every possible pair of values from two different factors is tested at least once. This significantly reduces the total number of test cases while still maintaining good defect detection effectiveness.
A factor is an input variable or parameter that can affect the behavior of the system under test. For example, 'Browser', 'Operating System', or 'User Role'.
A value (or element) is one of the possible settings or options for a factor. For example, for the factor 'Browser', the values might be 'Chrome', 'Firefox', and 'Safari'.
Imagine you have 4 factors, each with 3 possible values. Testing all combinations (3⁴) would require 81 test cases. But with pairwise testing, you might only need around 9 test cases to cover all possible 2-factor value combinations.
This reduction is possible because pairwise assumes that most defects are caused by interactions between two factors, not three or more. By testing all 2-factor combinations, you can detect a large percentage of defects with far fewer test cases.
To use the pairwise testing tool, follow these steps:
Enter your test data into the spreadsheet area.
The leftmost column should contain the names of the factors.
The second column and beyond should contain the values (elements) for each factor.
Example:
Factor | Value 1 | Value 2 | Value 3 | Value 4 | Value 5 |
---|---|---|---|---|---|
machine | iPhone | Pixel | XPERIA | ZenFone | Galaxy |
os | iOS | Android | Windows | ||
browser | FireFox | Chrome | Safari | Edge | |
version | 7 | 8 | 9 | 10 | 11 |
Use the 'Factors to be covered' field to specify the level of interaction coverage.
For pairwise (2-way) testing, enter 2.
To generate combinations covering 3-way interactions, increase the value to 3, and so on.
If you want to restrict or filter out certain combinations, you can define constraints using PICT format. See the section below for more details.
Click the 'Generate' button. The tool will process the inputs and display the optimized set of test combinations below.
Note: If you have many factors or many values, generation may take some time.
Once the combinations are generated, you can click the 'Download' button to save the results as a file.
PICT format is a simple way to describe constraints between factor values to prevent invalid or undesired combinations. The syntax is based on logical expressions. Constraints allow you to exclude specific combinations using PICT-style syntax. The supported operators and logical connectors are as follows:
Symbol | Meaning | Example |
---|---|---|
= | Equals | IF [browser] = 'Safari' |
<> | Not equals | IF [os] <> 'Windows' |
> | Greater than | IF [version] > 10 |
< | Less than | IF [version] < 8 |
>= | Greater than or equal | IF [version] >= 8 |
<= | Less than or equal | IF [version] <= 8 |
LIKE | Pattern match | IF [browser] LIKE 'Fire*' |
*
matches zero or more characters
e.g., 'Fire*'
matches 'Firefox', 'Firebird', 'Fire''Win??'
matches 'Win10', 'Win11', but not 'Windows'AND, OR – Combine multiple conditions Example:
Parentheses () – Group conditions for complex logic Example:
You can also use an ELSE clause to specify what should happen if the condition is not met. Example:
This provides fine-grained control over what combinations are allowed or excluded.