I'm using OpenCover to generate functional test coverage for a web application. These tests are fairly long running (3+ hours), so we've chopped them up into multiple tests that run in parallel. So instead of a single coverage report, there are six.
In order to import these coverage reports into SonarQube, I need to figure out a way to combine them into one uber report. ReportGenerator supports merging multiple reports into one, but creates HTML output, which is not something SonarQube can consume.
At this point my options are
- hand-roll an OpenCover report merger (blech!)
- Run my functional tests serially, substantially increasing failure feedback times
Any other options I'm missing?
Newer version of Report generator has support for wild card.
You can provide all XML reports as "*.XML" and Report Generator will generate one consolidated report from it.
I have created the following ticket on the SonarQube .NET side to allow multiple coverage reports to be specified, and to aggregate them: http://jira.codehaus.org/browse/SONARPLUGINS-3666.
In the meantime though, I cannot think of other options besides the 2 you already had.
OpenCover has
-mergeoutput
argument that makes it to work with the-output
file in an append-only fashion, preserving previous measurements found there. That should allow you to call individual test runs separately -- as long as your SUT is still same.My experience with trying to run tests with different
-filter
arguments is that OpenCover refuses to reopen module that has been filtered out in a previous test run. Still, worth a try from my opinion.