ReportGenerator 2.1 has just been published as a beta release. This blog post will explain the new feature trend/history charts and some other improvements.
Trend/history charts
When you use the new command line parameter -historydir:SOME_DIRECTORY each execution of ReportGenerator will generate a XML file containing coverage information. On subsequent executions those files are used to render some trend charts.
Charts are generated in each class report and in the summary report. They show evolution of line and branch overage over time:
The directory used for -historydir should be a persistent directory that is not cleaned between builds, otherwise history will get lost.
Branch coverage is only available if you use OpenCover (version 4.5.3207 and above).
Branch information in class report
The class report now shows a visual indicator for branch coverage. A red/green bar indicates the coverage of a branch.
Feedback
Feedback is highly appreciated. Let me know if you like the new charts?
Download
The latest beta release can be found on Nuget. The final release will be available on GitHub as well.
Stan
12/15/2015
http://stanbashtavenko.com/
It is awesome to have a generic code coverage parser! Why not expose it (making those classes public as opposed to internal)? In that way some one could pull a nuget and use only a parser. I understand that the output could be generated in xml, but yet I would much rather get coverage through API.
Daniel
3/10/2015
@tempora:
1)
Version 2.1.2 is the latest stable release.
You can use this without worries.
2)
That's correct.
If the coverage data between two events did not change, then only the first event is shown. As soon as you make real changes to the code base, then you will see more events in the chart. One of the following properties has to change:
CoveredLines
CoverableLines
TotalLines
CoveredBranches
TotalBranches
I decided to only show "real" events in the charts, because after a lot of builds, it more useful to see the actual changes over time instead of some straight lines.
3)
The HTML contains a static table containing all assemblies and classes. This should be rendered quite fast (depending on your browser and your hardware)
If JavaScript is enabled, then this table is dynamically replaced with a table that can be filtered and sorted.
This dynamic table is only used if the report contains less than 1500 classes. If you have more classes then you have to activate the dynamic filtering by clicking on a button labeled "Enable filtering".
So in any case the performance should be OK. Please make sure to use the latest release for best performance!
Let me know if something is unexpectedly slow.
You could also try the plain text report. Just pass "-reporttypes:TextSummary" for that
tempora
3/10/2015
The history coverage trend will be helpful for user to trace the coverage
change, I like it.
And I have 2 questions:
1: about the new version 2.1.0.0, because it it beta release, and I am using 1.9.0.0, is it ok if I continuously use the 1.9.0.0 version instead of 2.1.0.0?
2: For the history chart, if for one class, the coverage is always the same, based on my experiment I found there is no history chart for that class, is it some operation error from my side?
3: Because there are huge number of dlls and classes in my report, so the browser performance is too bad, could you please give me some suggestion to improve it? I am not sure the 2.1.0.0 "Collapse all" feature can solve it or not, for my understanding, it still can't, because the html source code is almost the same, Am I right?
Thank you for your help and waiting for your answer!