Metrics Home

Metrics Articles

Metrics Keywords

Metrics

statement coverage

What
"The percentage of executable statements in a component that have been exercised by a test case suite."
BS 7925-1.British Computer Society Specialist Interest Group in Software Testing (BCS SIGIST)

A related metric is to measure Decision Coverage..

Why?
A metric used to track the amount of testing conducted on one or more components, using statement testing. As this type of testing seeks, ideally, to execute every statement in the code, it is an important guide as to the amount of testing done, and the amount left. Especially that of Structural or White Box testing.

Who?
By personnel as close as possible to the code or testing. Thus the Test Analyst or tester. The coverage figure for individual aggregrates can be aggregated up of course to provide an overall management figure. However, the larger and complex a system is, it becomes harder to aggregrate.

Where?
At the devloping site.

When?
Ongoing throughout the lifecycle as components are identified, test analysis can begin, and the metric calculated.

How?
Two measurements are essential, the total number of statements, and the number to be tested, by the test suite. Note the two figures do not have to match. In non-safety critical systems, it will not be cost effective to test the last nth statement on some obscure path.

At the start of testing the test analyst should know the percentage that will be tested. As testing progresses he can see the percentage that has actually been tested.

Statement Coverage =
Executable Statements Tested

Total No. of executableStatements
Google
Web www.riskmanagement.force9.co.uk

Metrics Bestsellers
The bestselling books on Amazon.

Articles

boundary value coverage

statement coverage

N-switch coverage

data definition-use coverage

data definition P-use coverage

Visit our site of the month Load Testing