Better Software Through Test Coverage: A Practical Guide To Making Your Test Suite Suck Less
All software is imperfect. As developers we strive to measure and limit imperfections through the use of test suites. However test suites are themselves software and hence imperfect. The most common failing of test suites is that there aren't enough tests, so the suite fails to exercise all of the Code Under Test (and untested code is buggy code). Using test coverage tools we can measure how well a test suite covers code, and combine that knowledge with our knowledge of the code to write more and better tests. The paper will describe ggcov, the author's open source test coverage analysis GUI for the GNU Compiler Collection. It will describe the types of coverage information that ggcov does and does not provide. Further, it will provide practical advice on using ggcov to improve test suites, based on the author's experience with test coverage studies of userspace and kernel applications on Linux.
Keywords: testing, coverage, gcc, C, C++
Greg Banks
R&D Software Engineer, File Serving Technologies, Silicon Graphics, Inc.
|
Ref: OS6P0037