Tool Pocket
Reset
Back

🆔 Pairwise generator

Generate pairwise combinations.

What is Pairwise Testing?

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.

Factors and Values

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'.

Why Use Pairwise Testing?

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.

How to Use

To use the pairwise testing tool, follow these steps:

1. Input Your Data

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:

FactorValue 1Value 2Value 3Value 4Value 5
machineiPhonePixelXPERIAZenFoneGalaxy
osiOSAndroidWindows
browserFireFoxChromeSafariEdge
version7891011

2. Set Coverage Level

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.

3. Add Constraints (Optional)

If you want to restrict or filter out certain combinations, you can define constraints using PICT format. See the section below for more details.

4. Generate Combinations

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.

5. Download Results

Once the combinations are generated, you can click the 'Download' button to save the results as a file.

About PICT Format (Constraint Format)

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:

Comparison Operators

SymbolMeaningExample
=EqualsIF [browser] = 'Safari'
<>Not equalsIF [os] <> 'Windows'
>Greater thanIF [version] > 10
<Less thanIF [version] < 8
>=Greater than or equalIF [version] >= 8
<=Less than or equalIF [version] <= 8
LIKEPattern matchIF [browser] LIKE 'Fire*'

LIKE Wildcards

  • * matches zero or more characters e.g., 'Fire*' matches 'Firefox', 'Firebird', 'Fire'
  • ? matches exactly one character e.g., 'Win??' matches 'Win10', 'Win11', but not 'Windows'

Logical Operators

AND, OR – Combine multiple conditions Example:

Parentheses () – Group conditions for complex logic Example:

ELSE Clause

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.