This Article 
 Bibliographic References 
 Add to: 
2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation
Static Estimation of Test Coverage
Edmonton, Alberta, Canada
September 20-September 21
ISBN: 978-0-7695-3793-1
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.
Index Terms:
test coverage, static analysis, slicing, estimation, metrics
Tiago L. Alves, Joost Visser, "Static Estimation of Test Coverage," scam, pp.55-64, 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation, 2009
Usage of this product signifies your acceptance of the Terms of Use.