Measuring a Java Test Suite Coverage Using JML Specifications

Frédéric Dadeau, Yves Ledru, Lydie du Bousquet · Electronic Notes in Theoretical Computer Science · 2007

We propose in this paper a way to measure the coverage of a Java test suite by considering the JML specification associed to the Java program under test. This approach is based on extracting a predicate-based graph from the JML method specifications. We then measure the coverage of this latter w.r.t. nodes of the graph that are visited by the test suite. In addition, we propose to check whether the test suite satisfies classical condition coverage criteria. We also introduce a tool, to be used as precompiler for Java, that is in charge of measuring and reporting the coverage according to these criteria.

Read the paper · More papers on PaperTik