DotCover: How to remove code coverage highlighting from your code - dotcover

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?

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

Ok, after hours of playing with it, I realized how to remove it. You just need to close the unit testing session and it will remove it (closing the window or Unit Test Sessions window doesn't work).

In Visual Studio 2022: Simple ON or OFF

Related

Possible to turn off automatic run of tests in Visual Studio 2017 every time I build my local solution?

I have a solution that includes many tests, but I don't want to automatically run the tests every single time I build. Is there a way to do this in Visual Studio 2017?
I've checked Tools/Options. I've searched for this question in Stack Overflow, but don't find this question.
I've also checked the Solution Properties, but I don't see anything.
This question isn't a duplicate of this Stack Overflow question How to Prevent automatic test execution because it deals with the web portal and not Visual Studio 2017 IDE, itself.
Have you tried disabling "Run Tests After Build" from the Test Explorer window's toolbar? It should be the first button on the toolbar.
To open the Test Explorer window, go to Test -> Windows -> Test Explorer.
You first go to Test in the main menu, then go to Windows and then under the Windows, Run Tests After the Build button

visual studio code unit test discovery frequency setting

When I'm updating my existing unit tests, Visual Studio code drops a status bar from the top letting me know that it could not correctly discover unit tests every time I save the file. This is expected since I'm actively typing so everything is not working python.
Have I configured something incorrectly? Is there some way to tell visual studio to chill out on the unit test discovery?
Of course, I can simply hit the "close" button, but this is extremely distracting.
Disable Live Unit Test running on the background.
Under Test->Test Settings-> uncheck 'Keep Test Execution Engine Running'. I am using VS 2017 & VS 2015.

How to export unit test results/stack trace from Resharper

I have quite a lengthy test session which has detailed output in the Resharper test runner. How could I export the "execution log/stack trace" shown in the right window for all tests.
I think this should be quite simple, since these results must be saved somewhere since they survive visual studio restarts/computer reboots.
So accessing the raw files is fine for me.
Thnx in advance for some insights.
Kind regards,
Dwight
You just have to run all your unit tests with Resharper.
Open Visual Studio -> In menu, choose Resharper -> Unit Tests -> "Run All Tests From Solution".
This will open a new window that runs all your tests.
In this window, you have a little square with an arrow pointing upwards to the right to the left of "Options". Here you can choose to export to different formats.

Keyboard shortcut for debugging the LAST test run in Visual Studio IDE (2013)

I know there are several VS keyboard shortcuts for running unit tests, but the one I really can't find and would like is to be able to run the last executed test in debug mode.
Ctrl+R, L will repeat the last run, but not in debug mode.
If you are debugging a test, and it changes context to the code you are actually running, and then you stop the test, is there a way to start that test in debug mode again using just the keyboard?
I wanted the same thing.
Based on the technique found in the following post
Visual Studio 2012 debug tests keyboard shortcut
I searched for TestExplorer.DebugSelectedTests and assigned a shortcut key to it.
At least in VS2015 (and hopefully in VS 2013) even while debugging changes context to the code you are actually running. The test remains selected in the test explorer window. So, you can run your shortcut key combo and the test will debug again.
Hope this solves the problem for you too.
I know this question was for Visual Studio 2013, but got google go me here.
In Visual Studio 2019 is a shortcut for that Ctrl+R,D:
If you are using ReSharper, you can use Ctrl+U, D to rerun a test in Debug mode.
https://www.jetbrains.com/resharper/features/unit_testing.html

My ReSharper Gutter Icons for Unit Tests aren't showing

I've installed ReSharper 4.1 and Gallio 3.0.5, but I don't get the gutter icons for unit tests. The tests seem to run fine in the Test Explorer, but I don't have icons next to the tests in code. What could be causing this? I previously had the MbUnit 2.4 ReSharper plugin installed, but it should be uninstalled now.
I did this to get them to show up again. Maybe it was an overkill.
Uninstall ReSharper
Uninstall Gallio
Delete %appdata%\JetBrains folder
Install ReSharper
Start Visual Studio
Close Visual Studio
Install Gallio
Start Visual Studio
I think the key was deleting the %appdata%\JetBrains folder, because there could have been some old plugin files in there.
Another really late answer here, but if you don't have Resharper Code Analysis enabled then the gutter icons won't show up. Had to help a teammate figure this out yesterday.
Maybe a bit long ago, but if someone stumbles on this question...
I had the same problem with Resharper 2016.2
Resharper -> Options -> Code Inspection -> Settings
In my case the project containing the unit test was listed in the "Files and folders" list under "Elements to skipp". After I had removed the project, the icon appeared again.
using Visual Studio 2017, fixed mine using the Code Analysis icon in the upper right corner of the code window missing the gutter test icons.
The analysis was suspended because of the large test file. Had to hit resume twice, then icons finally reappeared.
I've had this issue a number of times when doing clean installs. Sometimes the gallio-resharper plugin installs perfectly, sometimes it does not. I tried the steps above to no avail.
I found this link: http://confluence.jetbrains.net/display/ReSharper/Deploying+plugin
And did the following
Created a Plugins folder in "C:\Program Files (x86)\JetBrains\ReSharper\v5.1\Bin\"
Copied the resharper plugin files from GallioBundle-3.3.458.0.zip\bin\ReSharper into this folder
Suspended and resumed resharper in Visual Studio 10 by using the button in Tools|Options|Resharper
After this, the plugin got enabled.
I am running W7x64 professional.
Hope this can be of help to other people as well. :-)
Suspend and Resume Resharper may work. It was working for me.
Try the following steps, they worked for me,
Open the Resharper installer
check if any item is asking for repare, if yes then click on install.
Now open visual studio and go to resharper option
if the first option is "why dot cover is diabled", click on it.
and enable the dot cover by either taking the free trial or logging in with your resharper id.
It will take few seconds to refresh
You will get back those icons for running or debugging unit test.