# What is all-pair testing in software testing?

All-pairs also known as pairwise testing is a testing approach taken for testing the software using combinatorial method. For each pair of input parameters to a system (typically, a software algorithm), tests all possible discrete combinations of those parameters.

Using carefully chosen test vectors, this can be done much faster than an exhaustive search of all combinations of all parameters, by “parallelizing” the tests of parameter pairs. “All-Pairs technique is very helpful for designing tests for applications involving multiple parameters.

ISTQB defines All-Pairs Testing (or Pairwise Testing) as: A black-box test design technique in which test cases are designed to execute all possible discrete combinations of each pair of input parameters.

Let us also understand the concept of All-pairs testing by taking an example.

**Example**

An application with simple list box with 10 elements (Let’s say 0,1,2,3,4,5,6,7,8,9) along with a checkbox, radio button, Text Box and OK Button. The Constraint for the Text box is it can accept values only between 1 and 100. Below are the values that each one of the GUI objects can take:

List Box – 0,1,2,3,4,5,6,7,8,9

Check Box – Checked or Unchecked

Radio Button – ON or OFF

Text Box – Any Value between 1 and 100

Exhaustive combination of the application is calculated.

Now, the idea is to bring down the number of test cases. We will first try to find out the number of cases using the conventional software testing technique.

We can consider the list box values as 0 and others as 0 is neither positive nor negative. Radio button and check box values cannot be reduced.

So each one of them will have 2 combinations (ON or OFF). The Text box values can be reduced into three inputs (Valid Integer, Invalid Integer and Alpha-Special Character).

Now, we will calculate the number of cases using software testing technique is 2*2*2*3 = 24 (including negative cases).

Now, we can still reduce the combination further into All-pairs technique.

Step 1: Order the values such that one with most number of values is the first and the least is placed as the last variable.

Step 2: Now, we will start filling the table column by column. List box can take 2 values.

Step 3: The next column is of check box. Again, Check box can take 2 values.

Step 4: Now, we need to ensure that we cover all combinations between list box and Check box.

Step 5: Now, for checking the Radio Button we will use the same strategy. It can take 2 values.

Step 6: Below table shows a proof that we have covered all the pair values.

Result of Pair-Wise Testing

**Share This:**