My ReSharper Gutter Icons for Unit Tests aren't showing - unit-testing

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.

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 Test Explorer window not refreshing

Multiple times throughout the day, my Test Explorer window in Visual Studio 2017 is locking up. Whilst it doesn't crash VS, when affected I can't run any tests as none of the options are available when right clicking on a test....
I have a mixture of NUnit and SpecFlow+ tests in different projects. Cleaning and rebuilding the solution doesn't work, the test explorer window doesn't change. Attempting to use the 'NUnit test (click to run)' option also does nothing.
The only way to resolve this issue is to restart Visual Studio which is highly frustrating.
Anyone know what the issue could be?
Thanks
I was also facing the same issue, as a workaround I Unloaded my test project and then Reloaded back; then ran the test again. This time it refreshed the Test explorer :)
My VS version: VS Professional 2019 Version 16.9.6.
Note: I had to do this to all my Test projects.
I have had multiple issues with specflow+. In the end I uninstalled specflow+ and went with normal specflow. This solved many issues for me, including this issue. Hopefully it will work for you as well.

Start Recording for Microsoft Coded UI Test 2017 is not selectable

I am just begining to learn about Coded UI test. Since it is still 2017, I figure Visual Studio 2017 is the best version I can try. Having a Visual Studio Enterprise license I decided to try it out. Turns out I have it installed even. Great. There are lots of tutorials that all seem to start the same way:
Start a new coded UI test builder project in Visual Studio.
generate coded ui test using test builder.
When the test builder pops up, most of the buttons on the tool including the record button are not selectable. There must be a configuration issue or a problem with my proceedure. What could be going wrong?
It is possible that there are other answers to this question, but one resolution to the issue seems to be that I origionally launched the project by selecting Coded UI test project from the installed node of the tree view for launching a project... When I launched a new project from the C# language sub node, then it worked. This seems like a bug to me. Now when I try to repeat launching a new project from the installed node nothing happens.
So now that I select the selectable recording button it tells me to restart the computer. Thats fine... OK: it appears to be working.

DotCover: How to remove code coverage highlighting from your code

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

How can I run xUnit Unit Tests with VS2015 Preview?

I added the "xUnit.net runner for Visual Studio" v0.99.8 via Extensions Manager, but when I open the Test Explorer window, it does not seem to pick up any of my unit tests. Also, the Resharper 9 EAP does which is the only version of Resharper that supports VS2015 does seem yet to have the plugin for xUnit Test Runner.
How then, can I run xUnit Unit Tests in VS2015 Preview?
You can find the answer here: http://blogs.msdn.com/b/webdev/archive/2014/11/12/announcing-asp-net-features-in-visual-studio-2015-preview-and-vs2013-update-4.aspx
Visual Studio supports running and debugging for ASP.NET 5 xUnit tests through test explorer. All you need to do is add the xUnit dependencies and test commands to the test project's project.json file, as shown below (NOTE: To install the xUnit packages you will need to add https://www.myget.org/F/aspnetvnext/api/v2 as a NuGet package source):
"dependencies": {
"Xunit.KRunner": "1.0.0-beta1"
},
"commands": {
"test": "Xunit.KRunner"
},
If anyone is asking how to add https://www.myget.org/F/aspnetvnext/api/v2 as a NuGet package source...
here are the steps:
In Visual Studio 2015 Preview go to Tools -> Options -> NuGet Package Manager -> Package Sources
Click the Plus (Add) button at the top (see image below)
Enter the Name and Source like in the image below (NOTE: be sure to click the Update button after entering the Name and Source)
Happy coding!
You need to add reference to these 3 nuget packages:
"xunit": "2.1.0.0-beta1-build2945",
"xunit.runner.aspnet": "2.1.0.0-beta1-build60",
"xunit.runner.visualstudio": "2.1.0.0-beta1-build1051"
Check this article for more info:
http://blog.developers.ba/unit-integration-testing-in-asp-net-5-and-visual-studio-2015-using-xunit-net/
With visual studio 2015 RC I could not get tests to work with the following:
"xunit": "2.1.0-beta2-*",
"xunit.runner.dnx": "2.1.0-beta2-*"
But tests started showing up in the Test Explorer after changing the casing of the first letter "x" to "X"
"Xunit": "2.1.0-beta2-*",
"Xunit.runner.dnx": "2.1.0-beta2-*"
When I change it back to lower case it fails. I have not yet found a way to get these tests to show up in the latest version of Resharper at this time.
Here is the post I followed to get this far and everything worked except for the casing for some reason:
http://xunit.github.io/docs/getting-started-dnx.html
I know this will be out of date soon, but hopefully it helps someone in the mean time :)
Regarding managing / running the tests through test explorer, it is available through nuget.
I had to install package xunit.runner.visualstudio version 0.99.9-build1021 in the test projects.
After building the solution, the tests showed up fine and I was able to run them.
BTW, this was for a windows service but should work for ASP.NET/Web projects.