Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCover: possible to merge multiple reports into one?

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

  1. hand-roll an OpenCover report merger (blech!)
  2. Run my functional tests serially, substantially increasing failure feedback times

Any other options I'm missing?

like image 544
Mitch A Avatar asked Apr 15 '14 16:04

Mitch A


1 Answers

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.

like image 160
Lukáš Lánský Avatar answered Sep 19 '22 17:09

Lukáš Lánský