Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Test Coverage; Graphical Display

I have been tasked with introducing automated unit test coverage reporting to our CI build environment (we use Hudson and MSBuild). I have used dotCover to produce the coverage data across several projects within a build job, merge that data, produce a single HTML report and integrated that with the Hudson dashboard for that job using the HTML Publisher Hudson add-in.

So far so good. But, what we ultimately want is a graphical display of unit test coverage metrics across the entire system code base (half a dozen build jobs, circa 50 projects) up on one of our team displays; a highly visible 'at a glance' test coverage status. I can build this myself with an app that will merge the dotCover coverage reports for all builds, report to xml and build my own UI around that, but is there a product out there that does this already? We are not married to dotCover, that can change, and it's doesn't have to be free or open source either.

like image 669
Myles McDonnell Avatar asked Jan 19 '26 23:01

Myles McDonnell


2 Answers

We are using NCover to get the test coverage and a bunch of other code metrics(symbol coverage, branch coverage and cyclomatic complexity).

It is pretty good for highlighting the coverage, you can browse through the source code as part of the reports and see which lines are covered and which are not.

You can also exclude test categories or specific namespaces from your reports.

As far as I know it integrates with Hudson.

like image 138
alxbrd Avatar answered Jan 23 '26 03:01

alxbrd


OpenCover and PartCover are both open source code coverage tools that can be integrated into build automation systems.

With both you can use ReportGenerator to display results; though PartCover does come with it's own viewer I prefer to use the ReportGenerator one myself as the HTML can be integrated quite nicely into a build status report.

You may also build your own reports using XSLT or such like as both tools have an XML output.

like image 40
Shaun Wilde Avatar answered Jan 23 '26 01:01

Shaun Wilde



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!