State coverage: software validation metrics beyond code coverage

  • Authors:
  • Dries Vanoverberghe;Jonathan de Halleux;Nikolai Tillmann;Frank Piessens

  • Affiliations:
  • Katholieke Universiteit Leuven, Leuven, Belgium;Microsoft Research, Redmond, WA;Microsoft Research, Redmond, WA;Katholieke Universiteit Leuven, Leuven, Belgium

  • Venue:
  • SOFSEM'12 Proceedings of the 38th international conference on Current Trends in Theory and Practice of Computer Science
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Currently, testing is still the most important approach to reduce the amount of software defects. Software quality metrics help to prioritize where additional testing is necessary by measuring the quality of the code. Most approaches to estimate whether some unit of code is sufficiently tested are based on code coverage, which measures what code fragments are exercised by the test suite. Unfortunately, code coverage does not measure to what extent the test suite checks the intended functionality. We propose state coverage , a metric that measures the ratio of state updates that are read by assertions with respect to the total number of state updates, and we present efficient algorithms to measure state coverage. Like code coverage, state coverage is simple to understand and we show that it is effective to measure and easy to aggregate. During a preliminary evaluation on several open-source libraries, state coverage helped to identify multiple unchecked properties and detect several bugs.