Daniel Palme

Daniel Palme

.NET consultant from Germany.

Blog > ReportGenerator - New release with coverage by test support

ReportGenerator - New release with coverage by test support

Since my last blog post about ReportGenerator a couple of features have been added. In this post I will describe the most important changes.

Apart from reduced memory usage and the possibility to generate several output formats at once, the top three new features are:

Wildcards in report file pattern

Wildcards are now supported in report file pattern. This means you don't have to specify every coverage file separately. E.g.


Support for Visual Studio coverage reports

Apart from OpenCover, PartCover and NCover the Visual Studio coverage format is now supported. Code coverage in Visual Studio can be enabled if you follow these instructions. After executing the tests you can export the coverage results and run ReportGenerator with the coverage file.

coverbytest support of OpenCover

When OpenCover is executed with the -coverbytest command line argument, OpenCover tracks the coverage by unit test.
That helps you to identify the code that was covered by a specific test.
It also helps you to find code that was covered by "accident", i.e. if a test should cover component A but also covers component B (because A uses B) you are able to check whether a specific test for B also exists (otherwise you probably did an integration test not an unit test).
ReportGenerator now helps you to visualize the coverage by test method. If a class is covered by several tests you will notice the "Test methods" element on the right. If you select an other test the report is updated with the coverage information of that test.

Coverage by test method


Have fun with the new features. The latest release can be found on Codeplex.

Subscribe to RSS Feed


Related posts


New comment










I tried to get it working with a .coverage file created by our build server running TFS/VS 2012 Update 1.
I receive an error Error during reading report 'C:\bin\1.coverage': Data at the root level is invalid. Line 1, position 1.

So I still need opencover for transforming to XML?



Are you talking about the "Visual Studio coverage reports"?
Could you please provide me the coverage file?

You could also use OpenCover but it should also work with Visual Studio coverage directly.