Daniel Palme

Daniel Palme

.NET consultant from Germany.

Blog > ReportGenerator - New release with risk hotspots analysis

ReportGenerator - New release with risk hotspots analysis

ReportGenerator 3.1 has just been released. The new version ships with a new risk hotspot analysis and several other improvements.

Summary report enhancements

If you are using OpenCover you will notice a new section "Risk Hotspots".
This section shows all methods where one or more metrics exceed certain thresholds.

The thresholds are defined as follows:

MetricThreshold
Cyclomatic complexity15
NPath complexity200
Crap Score30

You can adjust those metrics in ReportGenerator.exe.config if necessary.

Example output:

HotSpots

Warning: The Crap Score metric is not yet officially released.

History charts

The history charts now have a zoom button which reduces the view-port to the relevant region. This enables you to better visualize small changes in coverage.

With the new -tag:MyTag command line parameter you can pass a custom tag or build number to ReportGenerator. The tags are visible in the tool tips shown in the history charts. So can better trace which commit affected coverage.

Feedback

Feedback is highly appreciated. Let me know if you like the new enhancements/features.

Download

The latest release can be found on Nuget and on GitHub.


Subscribe to RSS Feed

 

Related posts

 

New comment

:

:

:

:

 

Comments

#1
Paul Kertscher

Paul Kertscher

12/18/2017

Hi,

unfortunately the "Risks Hotspots" do not show up for me. Are there any options to enable them?

Kind regards,
Paul
 
#2
Daniel

Daniel

12/18/2017

@Paul:
Are you using OpenCover or another coverage tool?
Which version do you use?
 
#3
Paul Kertscher

Paul Kertscher

12/18/2017

I'm using OpenCover version 4.6.519. Should be the latest and greatest - despite being shy of 2 years old now. Or should I build the 4.7.1 from source?
 
#4
Daniel

Daniel

12/18/2017

@Paul:
This version of OpenCover only supports the metric "cyclomaticComplexity".
If none of your methods exceeds the threshold of 15, you won't see any "Risks Hotspots".
 
#5
Mike

Mike

01/16/2018

Thanks for developing this tool. Extremely useful.

Is it possible to create a "change log" page? It will help us in deciding when we should update to a new version.
 
#6
Daniel

Daniel

01/16/2018

@Mike:
Please have a look at this document:
https://raw.githubusercontent.com/danielpalme/ReportGenerator/master/src/Readme.txt
 
#7
Edwin

Edwin

03/03/2018

do I need to use a special switch to turn on the history reports and the Cyclomatic_complexity? I have tried few things but cannot get it to work. btw, great project :)
 
#8
Daniel

Daniel

03/03/2018

@Edwin:
For history charts please add command line parameter "-historydir:YOURPATH"
Cyclomatic_complexity is available if you use OpenCover.
Please have a look at the generated OpenCover XML file.
If it contains any attribute "cyclomaticComplexity" with a value greater than 15, then the section "Risk Hotspots" will appear in the report.
If all values are less than 15, your code is perfect and you won't see anything :-)
 
#9
Edwin

Edwin

03/03/2018

Wow, great support. I tried that, it generates the html, but when I open it up nothing shows up. I can see the html code inside the file. BTW, very nice and clean code. Good job.
 
#10
edwin

edwin

03/03/2018

my mistake, it is working.
 
#11
Helo!

Helo!

04/11/2018

Good Job.