Web Analytics

Static Estimation of Test Coverage

In this joint study of the Universidade do Minho (Portugal) and SIG a novel technique is introduced for estimating test coverage using static analysis only, i.e. without the need to execute the tests.
 
Static Estimation of Test Coverage
by Tiago Alves (University of Minho and SIG), and Joost Visser (SIG)
Published in the proceedings of the 9th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2009), September 20-21, 2009, Edmonton, Canada.
 
Test coverage is an important indicator for unit test quality. Tools such as Clover compute coverage by first instrumenting the code with logging functionality, and then logging which parts are executed during unit test runs.
 
Since computation of test coverage is a dynamic analysis, it presupposes a working installation of the software. In the context of software quality assessment by an independent third party, a working installation is often not available. The evaluator may not have access to the required libraries or hardware platform. The installation procedure may not be automated or documented.
 
In this paper, we propose a technique for estimating test coverage at method level through static analysis only. The technique uses slicing of static call graphs to estimate the dynamic test coverage. We explain the technique and its implementation. We validate the results of the static estimation by statistical comparison to values obtained through dynamic analysis using Clover. We found high correlation between static coverage estimation and real coverage at system level but closer analysis on package and class level reveals opportunities for further improvement.
 
Download publication:
 
Static Estimation of Test Coverage

Copyright: © 2013 Software Improvement Group