[Buildbot-devel] Improve Buildbot's Coverage

Dustin J. Mitchell dustin at buildbot.net
Wed Oct 29 00:07:58 UTC 2014


We just hooked up "Coveralls", which helpfully displays the code
coverage of each commit to Buildbot.  "Code coverage" means which
lines of the source code were actually executed by the test suite.

A recent commit looks like this:

  https://coveralls.io/builds/1396287

Currently, the tests exercise 82% of Buildbot's code.  That's not bad,
but it isn't good either.  It means that 18% of the lines in the
codebase -- 5,372 lines -- aren't tested at all.  Untested code is
usually buggy!

If you've been looking for a way to get your feet wet with the
Buildbot source, this may be a good choice: look through the coverage
report for a file that sounds familiar to you -- maybe a step you've
used -- that has some missing lines.  Click on the filename and you'll
see the "missed" lines highlighted in red.  Open up the test suite for
that file (under master/tests/unit or slave/tests/unit) and work out a
way to exercise some of that missing code.

Here's a good file ot start with:
https://coveralls.io/files/334176519 - MTR test step

Dustin




More information about the devel mailing list