SOFTWARE TESTING - ALL PAIRS TESTING
http://www.tuto rialspo int.co m/so ftware _te sting _dictio nary/all_pairs_te sting .htm
Co pyrig ht tuto rials po int.co m
What is All pairs Testing ?
All-pairs also known as pairwise testing is a testing approach taken for testing the
software using combinatorial method. It's a method to test all the possible discrete
combinations of the parameters involved.
Assume we have a piece of software to be tested which has g ot 10 input fields and 10
possible setting s for each input field. T hen, there are 10^10 possible inputs to be tested.
In this case, exhaustive testing is impossible even if we wish to test all combinations.
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, T ext Box and OK Button. T he Constraint for the T ext 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
T ext Box - Any Value between 1 and 100
Exhaustive combination of the application is calculated.
List Box = 10
Check Box = 2
Radio Button = 2
Text Box = 100
Total Number of Test Cases using Cartesian Method : 10*2*2*100 = 4000
Total Number of Test Cases including Negative Cases will be > 4000
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 neg ative. Radio button and
check box values cannot be reduced. So each one of them will have 2 combinations (ON
or OFF). T he T ext box values can be reduced into three inputs (Valid Integ er, Invalid
Integ er, Alpha-Special Character).
Now, we will calculate the number of cases using software testing technique is 2*2*2*3 =
24 (including neg ative 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, start filling the table column by column. List box can take 2 values.
Step 3 : T he next column under discussion would be check box. Ag ain, 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, we will use the same strateg y for checking the Radio Button. It can take 2
values.
Step 6 : Verify if all the pair values are covered as shown in the table below.
T ext Box
List Box
Chec k Box
Radio Button
Valid Int
check
ON
Valid Int
others
uncheck
OFF
Invalid Int
check
ON
Invalid Int
others
uncheck
OFF
AlphaSpecialCharacter
check
ON
AlphaSpecialCharacter
others
uncheck
OFF
Result of Pair-Wise Testing :
Exhaustive Combination results in > 4000 Test Cases.
Conventional Software Testing technique results in 24 Test Cases.
Pair Wise Software Testing technique results in just 6 Test Cases.