Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DotCover: How to remove code coverage highlighting from your code

Tags:

I am using JetBrains' dotCover for writing my units tests in a .NET application. dotCover highlights the whole code base either green or red based on the code coverage, but I want to remove the highlights after I'm done checking the code coverage. So is there anyway to do this other than quitting Visual Studio, removing the Test Results folder and.dotUser file, and restarting the Visual Studio?

like image 537
NavidM Avatar asked Apr 29 '15 15:04

NavidM


People also ask

How do you exclude code coverage?

To exclude test code from the code coverage results and only include application code, add the ExcludeFromCodeCoverageAttribute attribute to your test class.

How do I turn off highlighting coverage in eclipse?

Go to Windows Menu bar > Show View > Other > Type coverage and open it. Click on Coverage. To clear highlightings, click on X or XX icon as per convenience. Excellent Thank you.

How do I display code coverage?

On the Test menu, select Analyze Code Coverage for All Tests. You can also run code coverage from the Test Explorer tool window. Show Code Coverage Coloring in the Code Coverage Results window. By default, code that is covered by tests is highlighted in light blue.


2 Answers

You can easily switch highlighting on and off by pressing Ctrl+Alt+K, H. Or you can click "Highlight code" on the toolbar of the "Coverage Results" window. enter image description here

like image 103
Maria Avatar answered Sep 27 '22 22:09

Maria


The existing answers didn't work for me. I found it in the Resharper menu.

Resharper >> Cover >> Toggle Code Highlighting

Resharper - Cover - Toggle Code Highlighting

like image 40
RubberDuck Avatar answered Sep 27 '22 22:09

RubberDuck