<div dir="ltr">It's been on my TODO list for a long time to set up regular coverage testing for Juju. I still haven't done it, but I've written a script that gets us a step closer:<div>    <a href="https://gist.github.com/axw/457a402b4dfb4e4267f9">https://gist.github.com/axw/457a402b4dfb4e4267f9</a></div><div><br></div><div>If you have gocov (go get <a href="http://github.com/axw/gocov/gocov">github.com/axw/gocov/gocov</a>), then you can run the above and you'll get a gocov profile sent to stdout after all the tests run. The usage for the script is, for example:</div><div>    juju-coverage.bash <a href="http://github.com/juju/juju/.">github.com/juju/juju/.</a>..<br></div><div><br></div><div>You can pipe the output back into a gocov command, e.g.</div><div>    juju-coverage.bash <a href="http://github.com/juju/juju/.">github.com/juju/juju/.</a>.. | gocov report<br></div><div><br></div><div>More likely, though, we would want to convert to Cobertura format using <a href="https://github.com/AlekSi/gocov-xml">https://github.com/AlekSi/gocov-xml</a>, and then use the Jenkins plugin to render the output. Alternatively we could use <a href="https://github.com/mattn/goveralls">https://github.com/mattn/goveralls</a> to send the results to <a href="http://coveralls.io">coveralls.io</a>.</div><div><br></div><div>It would be nice to get this done so we know where testing is lacking. Maybe at Oakland?</div><div><br></div><div>Cheers,</div><div>Andrew</div></div>