Javatpoint Logo
Javatpoint Logo

All-pairs Testing

All-pairs testing technique is also known as pairwise testing. It is used to test all the possible discrete combinations of values. This combinational method is used for testing the application that uses checkbox input, radio button input (radio button is used when you have to select only one option for example when you select gender male or female, you can select only one option), list box, text box, etc.

Suppose, you have a function of a software application for testing, in which there are 10 fields to input the data, so the total number of discrete combinations is 10 ^ 10 (100 billion), but testing of all combinations is complicated because it will take a lot of time.

So, let's understand the testing process with an example:

Assume that there is a function with a list box that contains 10 elements, text box that can accept 1 to 100 characters, radio button, checkbox and OK button.

The input values are given below that can be accepted by the fields of the given function.

  1. Check Box - Checked or Unchecked
  2. List Box - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
  3. Radio Button - On or Off
  4. Text Box - Number of alphabets between 1 to 100.
  5. OK - Does not accept any value, only redirects to the next page.

Calculation of all the possible combinations:

The total number of test cases, including negative test cases, is 4000.

Testing of 4000 positive and negative test cases, is a very long and time-consuming process. Therefore, the task of the testing team is to reduce the number of test cases, to do this, the testing team considers the list box values in such a way that the first value is 0, and the other value can be any numeric number, neither positive nor negative. Ten values are now converted into 2 values.

Values of checkbox and radio button cannot be reduced because each has a combination of only 2 values. At last, the value of the text box is divided into three input categories valid integer, invalid integer, and alpha-special character.

Now, we have only 24 test cases, including negative test cases.

Now, the task is to make combinations for all pair technique, into which each column should have an equal number of values, and the total value should be equal to 24.

In order to make text box column, put the most common input on the first place that is a valid integer, on the second place put the second most common input that is an invalid integer, and at the last place put the least common input that is an Alpha Special Character.

Then start filling the table, the first column is a text box with three values, the next column is a list box that has 2 values, the third column is a checkbox that has 2 values, and the last one is a radio button that also has 2 values.

Text box List Box Check Box Radio Button
Valid Integer 0 Check ON
Invalid Integer Other Uncheck OFF
Valid Integer 0 Check ON
Invalid Integer Other Uncheck OFF
AlphaSpecialCharacter 0 Check ON
AlphaSpecialCharacter Other Uncheck OFF

In the table, we can see that the conventional software method results in 24 test cases instead of 4000 cases, and the pairwise testing method only in just 6 pair test cases.


Next TopicCause-Effect




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA