[Qgis-developer] Test coverage reports

Nyall Dawson nyall.dawson at gmail.com
Tue Dec 2 14:18:51 PST 2014

Hi all,

I've sent through a pull request [1] which allows for generation of
unit test coverage reports via lcov.

A sample output from this process is available at

So, how well are we placed at the moment?.. Well, overall test
coverage (excluding ui_* and sip files) sits at 18% line coverage, 27%
function coverage, and 9% branch coverage. This is excluding the pal
labeling tests which currently fail in utopic. Unsurprisingly, there's
almost no test coverage of code in app (<2%) and plugins. Gui is also
mostly untested, with the exception of gui/attributetable (40%) and
gui/editorwidgets/core (41%).

Core is a mixed bag - there's a handful of classes with really good
test coverage, and a lot with zero test coverage.

Anyway, it makes for interesting reading, and should help with
directing efforts for creating new unit tests.


[1] https://github.com/qgis/QGIS/pull/1712

More information about the Qgis-developer mailing list