Table of content

All Pairs Testing

All Pairs Testing is also a software testing type in which all the inputs combinations of the softwares are checked. The main objective of All-Pairs Testing is to reduce the number of test cases, but get all the input combination tested.

In All-Pairs Testing, a refinement is carried out after studying all the possible set of inputs that may constitute a test suite. And then the refined test case is applied to the software to get the entire set of possible combinations tested.

This is an intelligent task and only professionals are allowed to carry out this type of testing. This can be automated but only after the test suite is designed manually. All-Pairs Testing is important because some software has many numbers of inputs and one input may take different variables.

Now to check all the possible inputs by creating a test case which will generate values for all variables is not easy. And that would require either a Neural Network which will generate sequenced data or even manually it will take huge time.

Let us first try to understand, how a small software may have a huge finite combination of values.


As we can see in the above diagram, just to select a find in software like MS-Word, we have to check and select several options. Such as font types, font style, font sizes, font position in line, font colors, etc.

Now, in one attribute such as in font types, there can be more than 100 types of font. So the combination goes like this- Select a font -> select a font style -> select a font colour -> select font size -> GO.

In such cases, if there are 100 font types, 5 font styles, 20 font sizes, 4 underline style, 6 font positions, and 30 font colors.

Then the total number of possible test cases would be 100*5*20*4*6*30= 7,200,000 test cases. And to carry out the test case we may require different interacting software or a neural network, but none of them are feasible as the time required would be huge and cannot be afforded.

Now let us see the solution to this kind of problems. Let us take another simple scenario and try to understand how the problem could be optimized.

Let a webpage contains a form with has to be submitted. Now let the form contains a List Box, which can take values from 1 - 10, and contains a check button which can be either checked or unchecked, and a radio button, and a text-box too which can accept any value between 1 to 100.

List Box= 10 inputs. Check Box= 2 inputs. Radio Button = 2 inputs. Text Box= 100 inputs. Total Number of test cases (Positives) = 10*2*2*100= 4000 test cases. Total Number of test cases(negative) will be of course more than 4000.

Now if one directly one wants to create a test case based on all the possible combinations, then it would be again huge. Now we shall see the solution to it.

Step 1:

The attribute which takes the largest number of values should be considered and placed in the first column. In our case, the text-box takes the largest number of inputs (From 1 to 100). Now the text box value can be categorized into three different types:

  • Valid Integer.
  • Invalid Integer.
  • Alpha_numeric_character.

This is important to note that, we are not concerned about the values from 1 to 100, but we are concerned about the different types of values which can be accepted or not accepted.

Step 2:

We place the second largest attribute in the second column from the right. In our case, we place the list box and we take only two possible inputs- 0 (which is neither positive or negative) and other numbers. So our test value reduces to 2 possible cases.

Step 3:

Place the check/uncheck button in the third column and place the radio button in the fourth column. It is done so, because only if the button is checked, then only the radio button comes into function.

Therefore, it is seen that the test cases are now reduced to 6 only in place of 4000.

Dependency means when an attribute is dependent on the other. Some fields are to be chosen and selected only when the other field is dependent on it.

For example, in some web forms, there are fields like contact. Now if contact is selected then only, the other options like mobile, landline or country-code will turn active to be selected.

When the testing is to be performed in some software like online delivery, management system, information system, etc. In those cases, the dependencies are taken into consideration and the test cases are minimized or optimized.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions