ABSTRACT

This chapter describes some of the challenges and problems associated with gathering code coverage metrics. Loosely described, coverage metric is a measure of how much of the program code has been exercised during testing. The chapter deals with the types of code coverage that provide some indication of the quality of the testing carried out. It explains how the number of test cases needed to test combinations of parameters can be reduced without significantly affecting the quality of the tests; that is, how to achieve good combinatorial coverage. Statement coverage measures the proportion of statements that have been executed at least once during testing. It is unlikely that 100% statement coverage will be achieved, primarily because of defensive coding. Branch coverage is poorly defined, both in the standards and in the literature. An operating system is a program that can potentially take a number of different command-line parameters.