There are a number of different ways of measuring code coverage, the main ones being:
Usually the source code is instrumented and run through a series of regression tests. The resulting output is then analysed to see what areas of code have not been exercised, and the tests are updated to include these areas as necessary. Combined with other code coverage methods the aim is to develope a rigorous yet manageable set of regression tests.
Code coverage is ultimately expressed as a percentage, as in "We have tested 67% of the code". The meaning of this depends on what form(s) of code coverage have been used, as 67% path coverage is more comprehensive than 67% statement coverage.
See also: regression testing, static code analysis
Search Encyclopedia
|
Featured Article
|