ReportGenerator - New release with more advanced report preprocessing

 

ReportGenerator 1.3.0.0 has just been published. The new release offers some new features which I want do describe in this post.

Improved report preprocessing

The coverage reports generated by OpenCover/PartCover don't contain enough information to map every property/method to the corresponding source file.
For example auto properties are not mapped to a file. When a class contains only auto properties (e.g. a DTO), ReportGenerator was not able to map the class to the corresponding file and produced a report like this:

MissingFile

When the class contained at least one regular method, I was able to locate the auto properties in the corresponding file.
The new release now is able to locate the file, even if no other method is present. ReportGenerator searches the source directory for class files and locates the auto properties by using the NRefactory library.

In some cases ReportGenerator is not able to figure out the file. But you are able to supply one or more additional directories where ReportGenerator should look for the desired source files.
This can be done with the new command line argument: -sourcedirs.
The report will then look like expected:

After Preprocessing

Filtering assemblies

With the new release you are able to filter the assemblies that appear in the report. By specifying the command line argument -filters, assemblies could be included or excluded.
E.g. the following filter includes all assemblies that start with "MyAssembly.Include" but omits assemblies starting with "Exclude":

-filters:+MyAssembly.Include*;-Exclude*

Conclusion

I hope you like the new features. Feedback is always appreciated. Get the latest release on Codeplex.

Feedly Feedly Tweet


Related posts


Comments


Jürgen

Jürgen

9/21/2018

I figured it out by myself. I need to use version "4.0.0-rc4".


Jürgen

Jürgen

9/21/2018

Daniel, your report generator is awesome. So far I used it for generating HTML reports, but now I need 'Cobertura' reports, but it says "Unknown report type 'Cobertura'." on reporttype Cobertura. Any ideas what I'm missing?


Abudhakeer

Abudhakeer

5/26/2014

Yeah i knew it currently i am able to get only blocks covered if i drill down to each class, here will i be able to see the lines covered instead of block coverage?


Daniel

Daniel

5/26/2014

@Abudhakeer: Yes you can create reports based on Visual Studio? Please have a look here: https://reportgenerator.codeplex.com/wikipage?title=Visual%20Studio%20Coverage%20Tools Filtering is only possible for assemblies.


Abudhakeer

Abudhakeer

5/25/2014

One more thing is it possible to filter out 'std::' and other libraries in report generator? If yes how? If not is there any other work around?


Abudhakeer

Abudhakeer

5/25/2014

Is it possible to get lines coverage for reports generated using visual studio?


Abudhakeer

Abudhakeer

4/30/2014

Please refer this link http://stackoverflow.com/questions/23385191/coverage-report-using-opencover


Daniel

Daniel

4/30/2014

@Abudhakeer: No there is no other way. But why do you want to do that? I'm not sure if understand your second question. ReportGenerator reports are always based on the source code. It doesn't matter which coverage tool you are using. IMHO OpenCover provides the best results.


Abudhakeer

Abudhakeer

4/30/2014

Thank you for your reply! But i am using covearge xml generated by visual studio. Is there any other work around? One more thing, will i be able to get the coverage with respect to the source code rather than the report produced by the open cover which is with respect to test method i mean unit tests.


Daniel

Daniel

4/30/2014

@Abudhakeer: No, you can only filter full assemblies. When you are using OpenCover you can ignore classes by applying an attribute to that class.


Abudhakeer

Abudhakeer

4/30/2014

How to filter specific class in a test assembly? Is there any way to achieve this? Please asap!


Lemuel

Lemuel

3/28/2014

I love this report generator! Thanks so much.