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:
    https://gist.github.com/axw/457a402b4dfb4e4267f9

If you have gocov (go get github.com/axw/gocov/gocov), 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:
    juju-coverage.bash github.com/juju/juju/...

You can pipe the output back into a gocov command, e.g.
    juju-coverage.bash github.com/juju/juju/... | gocov report

More likely, though, we would want to convert to Cobertura format using
https://github.com/AlekSi/gocov-xml, and then use the Jenkins plugin to
render the output. Alternatively we could use
https://github.com/mattn/goveralls to send the results to coveralls.io.

It would be nice to get this done so we know where testing is lacking.
Maybe at Oakland?

Cheers,
Andrew
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to