Kcov - code coverage

Kcov is a code coverage tester for compiled programs, Python scripts and shell scripts. It allows collecting code coverage information from executables without special command-line arguments, and continuously 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:

You can see some example kcov coverage output for kcov itself and python scripts here. Source code for Kcov is available at github and more information on the implementation can be found in this blog post.

Code coverage can be useful to find bugs. Let's say you, by mistake, managed to add an extra goto fail; in your code - that shows up quite well in the coverage report:

When using kcov together with Jenkins, you get reports like these:

A running Jenkins instance with kcov coverage can be found here (covering kcov itself).

kcov is based on bcov by Thomas Neumann.


The latest version is available here:


Author: Simon Kagstrom