Information Technology Reference
In-Depth Information
Table 3.3 Number of occurrences of parameter-value pairs (3rd iteration)
p 1
p 2
p 3
p 4
1
2
1
2
1
2
1
2
0
5
2
3
3
3
3
3
Now we count the number of newly-covered target combinations. Both of the two
candidate test cases cover 6 uncovered target combinations. We choose
(
1
,
2
,
2
,
2
)
as the second test case.
Now we remove the target combinations covered by the second test case. So the
set of uncovered target combinations becomes:
{
///////////////////////////
( 1 , 1 , - , - ) ,
///////////////////////////
( 1 , 2 , - , - ) ,
/////////////////////////
(2,1,-,-)
(2,2,-,-),
///////////////////////////
( 1 , - , 1 , - ) ,
///////////////////////////
(1,-,2,-),
(2,-,1,-),
(2,-,2,-),
///////////////////////////
( 1 , - , - , 1 ) ,
///////////////////////////
(1,-,-,2),
(2,-,-,1),
(2,-,-,2),
///////////////////////////
( - , 1 , 1 , - ) ,
( - , 1 , 2 , - ) ,
( - , 2 , 1 , - ) ,
///////////////////////////
(-,2,2,-),
///////////////////////////
( - , 1 , - , 1 ) ,
( - , 1 , - , 2 ) ,
( - , 2 , - , 1 ) ,
///////////////////////////
(-,2,-,2),
///////////////////////////
( - , - , 1 , 1 ) ,
( - , - , 1 , 2 ) ,
( - , - , 2 , 1 ) ,
/////////////////////////
(-,-,2,2)
} .
Iteration #3 For the third iteration, the number of occurrences of parameter-value
pairs are shown in Table 3.3 .
We choose p 1 and value 2, which now appears the greatest number of times in
uncovered target combinations, and is a valid parameter-value pair.
For generating the first candidate test case, we choose p 2 ,
p 4 as the order of the
remaining parameters, and a possible selection of values for this order is “2(valid),
1(valid), 1(valid)”. The resulting test case is
p 3 ,
(
2
,
2
,
1
,
1
)
.
For generating the second candidate test case, we choose p 3 ,
p 4 as the or-
der of the remaining parameters, and a possible selection of values for this or-
der is “2(valid), 1(invalid, choose 2 instead), 1(valid)”. The resulting test case is
(
p 2 ,
,
,
,
)
. Note that when selecting value for p 2 , the first choice was 1, which
makes the partial test case
2
2
2
1
(
,
,
, )
violates constraint “ p 2 ==
p 1 ==
2
1
2
1
1”,
so the value was abandoned, and 2 was chosen.
Both of the two candidate test cases cover 5 uncovered target combinations. We
choose
as the third test case.
Now we remove the target combinations covered by the third test case. So the set
of uncovered target combinations now becomes:
(
2
,
2
,
1
,
1
)
{
///////////////////////////
( 1 , 1 , - , - ) ,
///////////////////////////
( 1 , 2 , - , - ) ,
/////////////////////////
( 2 , 1 , - , - )
/////////////////////////
(2,2,-,-),
///////////////////////////
( 1 , - , 1 , - ) ,
///////////////////////////
( 1 , - , 2 , - ) ,
/////////////////////////
(2,-,1,-),
(2,-,2,-),
///////////////////////////
( 1 , - , - , 1 ) ,
///////////////////////////
( 1 , - , - , 2 ) ,
/////////////////////////
(2,-,-,1),
(2,-,-,2),
///////////////////////////
( - , 1 , 1 , - ) ,
( - , 1 , 2 , - ) ,
/////////////////////////
( - , 2 , 1 , - ) ,
///////////////////////////
(-,2,2,-),
///////////////////////////
( - , 1 , - , 1 ) ,
( - , 1 , - , 2 ) ,
/////////////////////////
( - , 2 , - , 1 ) ,
///////////////////////////
(-,2,-,2),
} .
///////////////////////////
( - , - , 1 , 1 ) ,
( - , - , 1 , 2 ) ,
( - , - , 2 , 1 ) ,
/////////////////////////
(-,-,2,2)
 
Search WWH ::




Custom Search