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?
To exclude test code from the code coverage results and only include application code, add the ExcludeFromCodeCoverageAttribute attribute to your test class.
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.
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.
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.
The existing answers didn't work for me. I found it in the Resharper menu.
Resharper >> Cover >> Toggle Code Highlighting
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With