Equivalence class testing method is used to test each input parameter separately.

Assume that our program accepts dozen of input parameters. Bugs are rarely caused by a certain combination of all ten parameters. As a rule, the mutual influence of parameters that the user does not know about is the interface bug (the interface is not understandable intuitively). If you want to prevent a bug from occurring or being introduced in any phase of SDLC, take action – hire experts to monitor the process during which your product is built. Quality assurance and testing services from Ukrainian vendors greatly contribute to success of any project!

It will often happen that one parameter affects one of the few remaining ones, i.e. the most frequently occurring bugs are caused by a certain combination of two certain parameters.

Thus, you can simplify your task and test all possible values for each of the parameter pairs. This approach is called pairwise testing.

Here is an example. Suppose there are 3 binary input parameters (3 checkboxes). The number of all possible combinations is 2 to the power of 3 = 8, therefore, you need to perform 8 tests. Let’s try to gain time by testing the checkboxes in pairs.

We write out all combinations for the first and second checkboxes:

1st 2nd

0 0

0 1

1 0

1 1

Add the third column so that all 4 binary combinations are obtained in the second and third columns. This can be done in different ways, we’ll do it (the first column may be ignored):

1st 2nd 2nd

0 0 0

0 1 0

1 0 1

1 1 1

So, using four sets of input data (four tests) we will test two pairs of parameters: the first with the second one and the second with the third one. The only thing we need to do is to test the pair “first with third”.

Let’s write out the 1 and 3 columns separately:

1st 3rd

0 0

0 0

1 1

1 1

As you can see, in this case we have two of four possible combinations. Combinations “01” and “10” are absent here, and the combinations “00” and “11” are present twice. Well, let’s add 2 more lines (two more tests):

1st 3rd

0 0

0 0

1 1

1 1

0 1

1 0

We will place the second column back:

1st 2nd 3nd

0 0 0

0 1 0

1 0 1

1 1 1

0 1

1 0

It turns out that the last two tests can be run for any values of the second parameter. It is possible to add, for definiteness, zeros to these empty spaces:

1st 2nd 3nd

0 0 0

0 1 0

1 0 1

1 1 1

0 0 1

1 0 0

At blind search we get 6 tests instead of 8.

Can you save more? It turns out, you can.

Let’s return to step 1:

1st 2nd

0 0

0 1

1 0

1 1

Let’s add the third column in another way, changing the order of the combinations:

1st 2nd 3nd

0 0 1

0 1 0

1 0 0

1 1 1

All combinations for 1 and 2, as well as for 2 and 3 parameters are here. Excellent!

Let us now look at the combination of 1 and 3 parameters:

1st 3rd

0 1

0 0

1 0

1 1

Wow! What do we see? By changing the order of the values in the third column, we killed two birds with one stone: they combined both the 2nd with the 3rd and the1st with the 3rd parameters.

We have only 4 lines, all told, i.e. 4 tests, equivalent to the original six tests:

1st 2nd 3nd

0 0 1

0 1 0

1 0 0

1 1 1

A full search of all combinations in the third column is guaranteed to provide the minimum number of tests. However, judging from the fact that such minimization algorithms are still developed, an exhaustive search is unacceptable because it takes long. There are programs that produce acceptable results within an acceptable time, for example, the PICT program from Microsoft.