0% found this document useful (0 votes)
61 views

Test Cases For Decision Coverage and Modified Condition - Decision Coverage

This document compares the number of test cases needed to achieve decision coverage (DC) versus modified condition/decision coverage (MC/DC) for six Ada programming projects. It finds that MC/DC typically requires 5-10% more test cases than DC. The difference is larger when excluding subprograms without decisions or with single-argument decisions. Most additional MC/DC test cases are needed for decisions with more than six arguments, though these are rare. In general, almost 10% more test cases are required for MC/DC over DC.

Uploaded by

Tuyen Dinh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Test Cases For Decision Coverage and Modified Condition - Decision Coverage

This document compares the number of test cases needed to achieve decision coverage (DC) versus modified condition/decision coverage (MC/DC) for six Ada programming projects. It finds that MC/DC typically requires 5-10% more test cases than DC. The difference is larger when excluding subprograms without decisions or with single-argument decisions. Most additional MC/DC test cases are needed for decisions with more than six arguments, though these are rare. In general, almost 10% more test cases are required for MC/DC over DC.

Uploaded by

Tuyen Dinh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

4.7.

7 Difference between the necessary of DC and MC/DC test cases


In this chapter you can see the number of subprograms where the difference of necessary test cases are
0, 1, 2 ... The Diff means the difference between the necessary DC and MC/DC test cases. The Subpr
means how many subprograms are in the project where the difference between the two types of test
cases is in the previous column. The Min, Max mean the minimum, maximum of MC/DC test cases per
subprogram, and Avg, Dev mean the average and the standard deviation both of MC/DC and DC.

DC MCDC
Diff Subpr Min Max Avg Dev Avg Dev
0 21059 1 175 2.15 4.00 2.15 4.00
1 1070 3 88 4.10 5.46 5.10 5.46
2 342 4 41 5.06 4.85 7.06 4.85
3 125 5 35 5.74 5.00 8.74 5.00
4 75 6 95 9.09 15.35 13.09 15.35
5 34 7 19 5.56 3.56 10.56 3.56
6 35 8 27 8.11 5.98 14.11 5.98
7 24 9 44 11.17 11.51 18.17 11.51
8 19 10 22 5.53 3.45 13.53 3.45
9 13 11 49 9.08 10.65 18.08 10.65
10 3 12 25 7 5.72 17 5.72
11 8 13 28 6.50 5.20 17.50 5.20
12 7 14 34 9.43 8.33 21.43 8.33
13 3 15 16 2.33 0.47 15.33 0.47
14 5 16 31 10.40 5.82 24.40 5.82
15 2 60 105 67.50 22.50 82.50 22.50
16 3 44 72 39.67 11.90 55.67 11.90
18 2 20 40 12 10 30 10
19 3 33 37 16.67 1.88 35.67 1.88
21 3 61 247 113.33 80.87 134.33 80.87

68
DC MCDC
Diff Subpr Min Max Avg Dev Avg Dev
22 1 145 145 123 0 145 0
23 2 25 25 2 0 25 0
25 1 61 61 36 0 61 0
27 1 68 68 41 0 68 0
29 1 39 39 10 0 39 0
31 1 74 74 43 0 74 0
36 1 77 77 41 0 77 0

4.7.8 DC - MC/DC

In this chapter you can find how many test cases are needed for the project to cover DC and MC/DC.
In the following table, the
A means: the whole project,
B means: the whole project without those subprograms which do not contain decision,
C means: the whole project without those subprograms which contain decision with at least two 
arguments.

 DC  MC/DC difference ratio


A 54995 59024 4029 1.07

B 42168 46197 4029 1.09

C 13818 17847 4029 1.29

69
5 Summary and Conclusion

In this study we analyzed six projects written in Ada programming language. Our task was to estimate
the difference of test cases needed to satisfy the requirements of Decision Coverage and Modified
Condition / Decision Coverage.

The difference is about five to ten per cent depending the characteristics of the project. The main
reason we could not achieve greater difference is the decisions in most subprograms have only one
argument and there are several subprograms which do not contain decisions at all. If we exclude these
subprograms we get four times bigger difference. Most of all, the maximum number of arguments in
decisions affects the difference. For those subprograms where there are decisions with more than six
arguments, almost twice MC/DC test cases are needed than DC. But unfortunately these subprograms
are only less than one per cent of the whole projects.

In general we can say almost ten per cent more test cases are needed to satisfy the requirements of
Modified Condition / Decision Coverage than Decision Coverage.

70
6 References

[1] Kelly J. Hayhurst, Dan S. Veerhusen, John J. Chilenski, Leanna K. Rierson: A Practical Tutorial 
on Modified Condition/Decision Coverage
[2] http://www.bullseye.com/coverage.html 2008.03.01
[3] http://www.antlr.org/ 2008.03.02
[4] Oliver Kellogg: http://www.antlr.org/grammar/ada
[5] https://lemon.cs.elte.hu/site/ 2008.03.09
[6] http://www.gnu.org/software/glpk/ 2008.03.09

71

You might also like