Combinatorial Test

When a software application accept several inputs, each of which can assume different values, it is impossible - in general - to test all combinations of values of input variables, simply because they are too many. Let's make an example, consider a software feature that accepts as input three possible values A, B and C. These values can be chosen arbitrarily from the following table:

 

A

B

C

A1

B1

C1

A2

B2

C2

A3

B3

 

A4

   

# Values

4

3

2

Table 1 – Variables and values

 

The total number of possible combinations of variables (A, B, C) is equal to ; in practice, in order to ensure trying at least once all possible combinations of the values of the variables (A, B, C) 24 test cases must be carried out. Such combinations are the following:

 

1-4

5-8

9-12

13-16

17-20

21-24

A1;B1;C1

A1;B3;C1

A2;B2;C1

A3;B1;C1

A3;B3;C1

A4;B2;C1

A1;B1;C2

A1;B3;C2

A2;B2;C2

A3;B1;C2

A3;B3;C2

A4;B2;C2

A1;B2;C1

A2;B1;C1

A2;B3;C1

A3;B2;C1

A4;B1;C1

A4;B3;C1

A1;B2;C2

A2;B1;C2

A2;B3;C2

A3;B2;C2

A4;B1;C2

A4;B3;C2

Table 2 – A, B and C values’ variables combinations

 

Now, in this particular case, such number of tests can still be affordable. However, if we consider the general case of N variables X1, X2, …Xk, the first accepting n1 possible values, the second n2 possible values, the k-th that assumes nk possible values, the total number of combinations is equal to: 3*4*2*2*3=144 . Such a value, even for low values of n1, n2 ,…, nk is an high number. For example, if k = 5 and (n1=3; n2=4; n3=2; n4=2; n5=3) we get a combinations’ number equal to that is quite a large number of tests to perform if you want to ensure complete coverage of all combinations.

 

In real software applications, the number of values that can assume ni variables is high and it's easy to reach the hundreds of thousands (or millions) of combinations, which makes it impossible to perform comprehensive tests on all combinations.

How can we carry out an effective test when the number of variables and values is so high to make it impossible to exhaustively test all combinations? What reduction techniques apply?

Web Traffic

Today4
Yesterday34
This week35822
This month579
Total35822

Who Is Online

1
Online

Saturday, 16 December 2017 01:13
Powered by CoalaWeb