3

We've just done a large refactor to a project. I would like to use dotCover to compare the test coverage before and after this change, to make sure that we haven't inadvertently removed still-required unit tests.

The only possiblility I can see is to export the coverage as xml, and use a text-diff to view the two files, but that sounds pretty horrible. (I have about 350k lines.)

Is there a better solution?

Chris
  • 5,882
  • 2
  • 32
  • 57

1 Answers1

0

You can export the code coverage results before and after your refactoring and then compare both.

On the Jetbrains website, I found a little video tutorial how to do this, but I give you the youtube link here: dotCover How-To: Exporting coverage results


In short:

From the code coverage result browser you can click the "Export..." button on the top row and then choose your export format, e.g. HTML.

Martin
  • 5,165
  • 1
  • 37
  • 50
  • Thanks - but it's more the diff I'm looking for advice in how to do - I have around 350k lines, so exporting HTML and opening it in a web browser isn't any advantage over viewing the covering in dotCover. I'd though about exporting and text-diffing the raw xml, but that sounds pretty nasty...and I was hoping there would be a better option. – Chris Nov 10 '15 at 15:20
  • Thanks - I'm aware of this, but doing a text-diff of however many lines of xml isn't the easiest comparison to work with. Given you can merge two coverages, I was wondering if there might be an equivalent method to diff two coverages. (I've clarified this in my question - apologies it wasn't initially obvious.) – Chris Nov 10 '15 at 15:25