uncov, v0.3, 2016 – 2019
This file last updated on 25 March, 2019
uncov is a tool that collects and processes coverage reports.
By storing history of coverage reports it allows one to view how code coverage changes over time, compare changes that happened and view current state of the coverage.
The tool is deeply integrated with git repository of processed projects and thus avoids generation of static reports. Data is bound to repository information, but can be freely shared by several copies of the same repository (builds referring to unavailable git objects just won't be accessible).
Provided command-line interface should be familiar to most of git users and helps to avoid switching to a browser to verify code coverage.
It's also possible to display coverage information in a browser, say, on a CI server. This makes uncov something like self-hosted coveralls.io analogue (but note that Web-interface is secondary in this case and isn't feature complete).
Storage management tool itself is language independent and is relying on complementary tools to fetch and transform coverage data from language specific coverage harness.
Importer of coverage for C and C++ languages that collects data from
Support for other languages can be added by converting existing coverage tools
or even using them as is. The
new-json subcommand accepts JSON that's used by
coveralls.io API, all what's needed is to extract this JSON and
pipe it to
uncov new-json (some tools might already have a command-line option
--dump, others could be extended by adding it).
Overall structure and basic elements are expected to remain in place, however they aren't finalized and changes for the sake of improvement are possible. Databases will be migrated if schema changes, so previously collected data won't be lost.
Expected to work in Unix-like environments.
uncov-gcovinstead of a subcommand.
# drop coverage counters from previous run find . -name '*.gcda' -delete # < run tests at this point > uncov new-gcovi --exclude tests/ --exclude web/ --capture-worktree
The easiest way of checking out
uncov is by using it on itself (assuming that
you have just built it or just happen to have all the necessary development
In root of the project run
make self-coverage and then do
release/uncov build to see something similar to:
release/uncov dirs shows coverage per directory:
release/uncov changed shows files which have their coverage changed:
release/uncov show src/SubCommand.cpp shows annotated
When most of a file is covered, one probably wants to see just what's not yet
covered, this can be done with
release/uncov missed command:
Not everything can be demonstrated by self-coverage example above, so here are
some other interesting things. List of latest builds (
Results of comparison (
Annotated source code in Web-UI:
Annotated diff in Web-UI:
Deployed Web-interface can be seen here.
uncov-gcovis based on cpp-coveralls.
Version 3 of the GNU Affero General Public License.