Continous Deployment – Free Code Coverage tools Part 2
Ok so after part 1 now we have code coverage results it would be nice to see a report of this so we can display this on our build server after our tests have run.
To do this we can use ReportGenerator which is also on Github and an executable.
This can also run be run locally or on the build server which is nice as its a pretty useful feature to see your code coverage after a build on your build server.
The nice part being we can drill into namespaces and see what’s covered and what’s not.
Now over time it would be great to see code coverage historical results and see the coverage going up, well ReportGenerator now does historical graphs which is just another type of chart which we can very easily have generated for us.
When I add the flag -historydir:SOME_DIRECTORY I can have the report keep a chart of coverage of a history of time/builds so we can see our code coverage going in the right direction over time which is what we are after.
In the above screen shot as I write tests which cover my code and do builds I can see a graph over time of the coverage going up which is exactly what we are after, add more code that’s uncovered and the graph will trend downwards which isn’t what we are after.
I hope this helps someone out there, feel free to get in touch with questions, best place to get me is on twitter @gsuttie
Fore more information about report generator check out the guy who wrote it https://github.com/danielpalme/ReportGenerator. Big thanks to Daniel Palme who you can reach out to on twitter @danielpalme.