- Graphical
-
Presents coverage information as graphically as possible, using
bar graphs,
colour coding, and a
call graph display.
- Interactive
-
Information is linked together, e.g. double-clicking on a row in the
File List window displays the source
for that file in a Source window.
Information in tabular form is sortable by any column, and all
columns can be selectively shown or hidden.
- Arbitrary Subsets
-
Coverage summaries for various subsets of the source (All the source,
a particular source file, a particular function, a range of lines
in a file) are only a few clicks away. The summary is presented
in a window with both textual and graphical
representation.
- Multiple Directories
-
Source files spread over multiple directories are handled. The
File List window can display source
files either in a flat list or a tree. Lists of source files
show filenames with minimum pathnames from the common ancestor
directory.
- Suppress by Pre-processor Symbol
-
The --suppress-ifdef flag can be used to suppress source lines
inside #ifdef or #if blocks which depend on particular
pre-processor symbols. For example --suppress-ifdef TEST,DEBUG
will suppress source lines inside #if DEBUG or inside
#ifdef TEST. Suppressed lines are not reported in summaries.
This feature is useful to avoid having test infrastructure or debugging
code spuriously reduce the reported coverage level.
- Flexibility in Specifying Source
-
Source files can be specified by any combination of:
- Directory: all coveraged source files in the directory
and sub-directories.
- Executable: all the coveraged source files used
to build the object file and any shared libraries
on which the executable depends.
- Object file: all the coveraged source files used
to build the object file.
- Shared library: all the coveraged source files used
to build the shared library.
- Source file: exactly the specified source file.
- C++ Function Names Demangled
-
C++ function names are presented in readable demangled form.
- Non-local Control Transfer
-
Handles non-local control transfers, e.g. C++ exceptions or C longjmp.
- GNOME Integration
-
A .desktop file is provided so that ggcov appears
in the GNOME menu structure. New source files (or
object files, or executables) can be dragged-n-dropped
onto ggcov from Nautilus.
In GNOME 2.x, configuration parameters are stored in
the gconf database.
- Text Mode
-
ggcov comes with a text mode program
tggcov which can be used to provide
coverage reports for individual source files or entire programs.
tggcov is designed for non-interactive
use, e.g. as part of a build process or test suite.
- Jenkins Support
-
The text mode tggcov program has an option to generate an XML report in
the format used by the Cobertura
tool. This makes it really easy to use in the
Jenkins Continuous Integration server, with the
Cobertura Plugin.
ggcov also comes with a script git-history-coverage which correlates test
coverage data to git commits, printing a coverage summary which shows
how well tested recent code changes have been. This is useful for
nightly builds and Continuous Integration systems such as Jenkins.
- Call Graph Analysis
-
Calculates a call graph of all function calls known at compile time
(i.e. excluding calls made through function pointers or C++ virtual
function tables) and applies coverage data to this call graph. The
result is that you can see how many
times a function was called from various other functions.
The downside of call graph analysis is that ggcov
needs to read and pick apart object files to get the call data. The
code exists and works for i386 platforms with ELF format executables
only.
- PHP Web Interface
-
New in version 0.6 is a PHP edition of ggcov, which allows you to
provide code coverage information on the web. The web edition
has all the navigation and visualisation features of the GNOME
program, but available in any graphical browser (no Java or
Javascript required).
An online example is available.
To learn how to install the web edition and use it to provide
coverage data, download the ggcov-web
package and read the HOWTO.web file.