Pairwise method

from Wikipedia, the free encyclopedia

The term pairing method or English Pairwise method describes a method that is used when testing software in order to keep the number of tests of combinations of possible occupations of several input fields low. It can be classified in the black box tests .

definition

The idea behind the method is that it is often not necessary to test all possible combinations of inputs from multiple fields - it is often sufficient to just make sure that each field is tested in pairs with every other field in all combinations.

For example, if there is an input mask with four fields, each of which can have three different values, 81 tests would have to be carried out to completely cover all possible combinations:

test Field 1 Field 2 Field 3 Field 4
01 A. I. P X
02 A. I. P Y
03 A. I. P Z
04 A. I. Q X
05 A. I. Q Y
06 A. I. Q Z
07 A. I. R. X
08 A. I. R. Y
09 A. I. R. Z
10 A. J P X
## ...
78 C. K Q Z
79 C. K R. X
80 C. K R. Y
81 C. K R. Z

With the Pairwise method, the number of tests can be reduced to nine:

test Field 1 Field 2 Field 3 Field 4
1 A. I. P X
2 A. J Q Y
3 A. K R. Z
4th B. I. Q Z
5 B. J R. X
6th B. K P Y
7th C. I. R. Y
8th C. J P Z
9 C. K Q X

method

To get from a table with all possible combinations to a table using the Pairwise method, the following procedure can be used:

One looks at the rows of the table one after the other from bottom to top. The combinations of two values ​​are checked in each line. If such a combination exists again in another line, the line under consideration can be deleted from the table. This continues until no more lines can be deleted.

Remarks

  • In general, pairwise coverage of n + 1 fields with n values ​​each can be achieved through n ^ 2 tests.
  • With the Pairwise method, drastic reductions in the number of tests can be achieved. A table of 75 binary fields would result in a total of 2 75 (i.e. several trillion) possible combinations - with the Pairwise method 28 combinations are sufficient.
  • Errors that only occur with certain combinations of more than two fields (so-called multi-mode faults ) may be overlooked when using the Pairwise method!
  • Creating the reduced tables can be very time-consuming - but there are tools that relieve the tester of this task.