Information Technology Reference
In-Depth Information
Iteration #1
For the first iteration, the number of occurrences of parameter-value
pairs are shown in Table
3.1
.
We choose
p
1
and value 1, which appears the greatest number of times in uncov-
ered target combinations, and is a valid parameter-value pair.
•
To generate the first candidate test case, we choose
p
2
,
p
4
as the order of the
remaining parameters. According to the algorithm, a possible selection of values
of these parameters is “1(valid), 1(valid), 1(valid)”. So the resulting candidate is
(
p
3
,
1
,
1
,
1
,
1
)
.
•
To generate the second candidate test case, we choose
p
4
,
p
2
as the order
of the remaining parameters. And a possible selection of values for this order is
“2(valid), 1(valid), 1(valid)”. So the resulting candidate is
p
3
,
(
1
,
1
,
1
,
2
)
.
Now we count the number of newly-covered target combinations. Each of the two
candidate test cases covers 6 uncovered target combinations. We choose
(
1
,
1
,
1
,
1
)
as the first test case.
Now we remove the target combinations covered by the first 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 #2
For the second iteration, the number of occurrences of parameter-value
pairs are shown in Table
3.2
.
We choose
p
2
and value 2, which now appears the greatest number of times in
uncovered target combinations, and is a valid parameter-value pair.
•
To generate the first candidate test case, we choose
p
1
,
p
4
as the order of the
remaining parameters, and a possible selection of values for this order is “1(valid),
2(valid), 2(valid)”. The resulting candidate is
p
3
,
(
1
,
2
,
2
,
2
)
.
•
To generate the second candidate test case, we choose
p
3
,
p
1
as the order of the
remaining parameters, and a possible selection of values for this order is “1(valid),
2(valid), 2(valid)”. The resulting candidate is
p
4
,
(
2
,
2
,
1
,
2
)
.
Table 3.2
Number of occurrences of parameter-value pairs (2nd iteration)
p
1
p
2
p
3
p
4
1
2
1
2
1
2
1
2
3
5
2
6
3
6
3
6
Search WWH ::
Custom Search