Kcov - code coverage
Kcov is a code coverage tester based on bcov by Thomas Neumann. It allows collecting code coverage information from executables without special command-line arguments, and continuosly produces output from long-running applications. If you use and like kcov, feel free to make a small donation:
Using kcov is as simple as
$ kcov /path/to/outdir executable [args for the executable]
The main features of kcov are:
- Collects code coverage information from binaries directly - no compilation options
- HTML and Cobertura XML output without processing steps
- With Cobertura output, kcov coverage data can be easily integrated in the Jenkins continuous integration server.
- Shared libraries linked to the application are transparently covered
- kcov can accumulate data from multiple runs of the same program
- kcov generates an updated web page every second, so long-running programs can be watched "live"
- kcov allows output to be sorted, either by coverage percentage or filename
- kcov allows specifying paths to include and exclude in the coverage, thereby limiting noise from system header files etc
- kcov allows multiple program coverage to be kept in a single HTML output directory, and will automatically add more programs as they are run
You can see some example kcov coverage output for C64-network.org and kcov itself here. Source code for Kcov is available at github and more information on the implementation can be found in this blog post. A screenshot from the report:
And when using it together with Jenkins, you get reports like these:
A running Jenkins instance with kcov coverage can be found here (covering kcov itself).
The latest version is available here:
Author: Simon Kagstrom