0

I have several years of archival code coverage reports produced by various older versions of OpenCover and ReportGen. Looking at the most recent version of ReportGen, I've seen that it's added the ability to produce trendlines of code coverage over time. While that would be beneficial just going forward I'm wondering if there's a simple way to take all of the data from my archived data (I have the OpenCover xml files in addition to ReportGen's html output), and generate trendlines showing how coverage has changed over the last few years.

1 Answers1

1

There is no easy to way to achieve that.

To generate the history files, the OpenCover reports and the source code have to match. Otherwise you get wrong results. I think that's too much work, since you have to check out the correct code and then execute ReportGenerator for every OpenCover file.

Option two would be to extract the necessary information from the HTML reports. But you have to write a parser for that.

I think it's better to start with history now (Command line parameter : -historydir:DIRECTORY) and invest your time elsewhere.

Daniel
  • 920
  • 7
  • 19
  • Yeah, if I'd need to have matching code to generate the metrics it's probably not worth the effort of pursuing unless the customers IA person changes his mind and decides that having the historical code coverage graph box ticked is a must have not a nice to have. Oh well. – Dan Is Fiddling By Firelight Aug 29 '16 at 14:15