Software Testing - Pairwise Testing (Orthogonal Array Testing)
Pairwise Testing, also known as Orthogonal Array Testing (OAT) or All-Pairs Testing, is a Black-Box test design technique used to reduce the number of test cases while still achieving strong test coverage.
It is based on the principle that most defects are caused by interactions between two factors, not all factors combined.
So, instead of testing every possible combination, we test every pair of input values at least once.
This makes testing faster, cheaper, and highly efficient, especially for complex systems with many input combinations.
What Is Pairwise Testing?
Pairwise Testing ensures that for every pair of input parameters, all possible combinations of those pairs are covered.
For example, if you have:
-
3 Browsers (Chrome, Firefox, Edge)
-
3 OS (Windows, macOS, Linux)
A full combination test requires 9 test cases.
But Pairwise Testing may require only 3–4 test cases while still covering every browser–OS pair.
Why Use Pairwise Testing?
-
Input combinations grow exponentially
-
Testing every combination is not practical
-
Most bugs occur due to interactions between two factors
-
Pairwise testing minimizes effort while maximizing coverage
Where Pairwise Testing Is Useful
Perfect for systems with multiple input variables, such as:
-
Browsers × Operating Systems
-
Devices × Network Types
-
Payment methods × User types × Regions
-
Mobile configurations
-
Form fields with multiple options
How Pairwise Testing Works (Simple Steps)
-
Identify input parameters (e.g., OS, browser, device).
-
List possible values for each parameter.
-
Use Pairwise/OA technique to generate a set of test cases that covers all pairs of parameter values.
-
Execute the reduced test set.
-
Ensure all pair combinations are covered at least once.
Tools often help generate orthogonal arrays automatically.
Example 1: Browser × OS Compatibility
Parameters
-
Browser: Chrome, Firefox, Edge
-
OS: Windows, macOS, Linux
Full Testing:
3 × 3 = 9 combinations
Pairwise Testing Output (Example):
| Test | Browser | OS |
|---|---|---|
| 1 | Chrome | Windows |
| 2 | Firefox | macOS |
| 3 | Edge | Linux |
All browser–OS pairs covered using only 3 tests.
Example 2: Login Form with 3 Inputs
Inputs
-
Browser: Chrome, Firefox
-
Device: Mobile, Desktop
-
Connection: WiFi, Mobile Data
Full combinations:
2 × 2 × 2 = 8 tests
Pairwise Testing Sample Output:
| Test | Browser | Device | Network |
|---|---|---|---|
| 1 | Chrome | Mobile | WiFi |
| 2 | Chrome | Desktop | Mobile Data |
| 3 | Firefox | Mobile | Mobile Data |
| 4 | Firefox | Desktop | WiFi |
All pairs (Browser–Device, Browser–Network, Device–Network) are covered with just 4 tests instead of 8.
Why It’s Called Orthogonal Array Testing
Orthogonal Arrays provide a structured mathematical way to ensure:
-
Balanced combinations
-
Minimal number of tests
-
Maximum pair coverage
This improves test effectiveness while reducing redundancy.
Tools for Pairwise Testing
-
PICT (Microsoft)
-
ACTS (NIST)
-
AllPairs Tool
-
Hexawise
-
Pairwise Online Generators
These tools automatically generate optimized test sets.
Benefits of Pairwise Testing
-
Reduces test cases drastically
-
Saves time, cost, and effort
-
Covers all possible input pairs
-
Detects interaction-based defects
-
Ideal for large configuration matrices
-
Easy to implement with tools
Limitations
-
Only covers pairs, not combinations of 3+ factors
-
Not suitable when defects come from complex multi-factor interactions
-
Not ideal for workflows heavily dependent on sequences