I'm on update 3 with VS2015 and suddenly Test Explorer (for MSTest) doesn't show anything, it's just empty.
I don't have any extensions installed that relate to unit testing, no NUnit stuff, no Resharper etc. Obviously, solution has been compiled. The same for all solutions with unit tests, they all used to show tests in test explorer but suddenly they all are empty.
What does not work:
Rebooting
Restarting VS 2015
Devenv.exe /ResetSettings
Running a test (by right-clicking on test code)
Setting Processor Architecture to X64 in Test Settings
Starting VS in admin mode
Deleting contents of %LocalAppData%\Microsoft\VisualStudio\12.0\ComponentModelCache
Anyone have a fix?
pom
Please see issue and fix here: https://connect.microsoft.com/VisualStudio/Feedback/Details/2970831. Let us know if this fixed it in your case.
Related
I got this strange problem with VS2013, NUnit and resharper
When I try to run a single test it always runs all tests in the project. It doesn't matter if I select Run or Debug or if I start it from the editor, unit test explorer or unit test session.
Only the test I started show up in the Unit Test session. No results from the other tests is visible but break points are hit in all tests.
The problem seem to start at random after editing a test. Have tried clean rebuilds and restarting Visual Studio but the problem remain.
Restarting the computer helps but only until it starts again after some edit.
Using VS2013 update 5, Resharper 10.01 and Nunit 3.0.1 (also tried 2.6.4)
Is this a Visual Studio, NUnit or Resharper problem?
Only other strange thing I noticed is that CTRL-Q (R# show documentation) does not work within test methods. It always show documentation for the test method not the variable or class the cursor is on.
I have created a unit test project in VS2013, and I'm using it to create a test suite for my SQL Server 2012 database.
I have created 4 test classes so far and everything worked fine. When I created the 5th - magic! All tests disappear from the test explorer window.
I tried rebuilding the project - didn't work. Rebuilt the database project too; didn't work. Created a new unit testing project with a single unit test inside it - doesn't work.
Has this happened to anyone? Does anyone know what to do? Please help!
Visual Studio Test Explorer has icons that control what tests are shown, make sure what you want to see is selected. For example, if you unselect the green checkbox, tests will disappear as they pass.
Are you using nUnit? I've just had a similar situation moving to a new pc, causing all existing tests to disappear.
Go to Tools -> Extensions and updates -> Select Online on the left -> enter in the search box top right 'nunit test adapter' and install it.
One rebuild later and the tests appeared again.
Late to the party, but make sure you have the chemical bottle icon selected. If there's a failure it may have defaulted to failures (the X) icon selected in the test explorer window. Gets me every time.
I just had the exact same thing happen to be. Build, Rebuild, Clean Build, the Test Explorer couldn't list for me my unit tests!
This came after I changed the unit test project's platform target from "any CPU" to x64. I switched it back to "any CPU", built, and they appeared again. How frustrating.
I had a similar problem, the test appeared again after deleting the hidden .vs folder in the project build folder and then restarting visual studio.
I just had this very same problem and for me the solution was to go to Tools -> Extensions and updates, uninstall NuGet package installer for 2013 and re-install it.
I'm using VS2010 (with windows 7).
Every time I try to run a unit test it stays on "Pending" and the test cannot be completed.
I tried to follow this msdn instructions.
I tried debugging test method (test view/debug selection), set breakpoints, but VS2010 indicates: the breakpoint will not currently be hit... I'm in debug configuration.
Any advice?
If you have VS2010 and VS2012 installed on the same box you need to install SP1 for VS2010 or the unit tests sometimes won't work. (SP1 available here.)
Try to do a clean solution (right click solution and clean). And then do a rebuild. That should solve the problem.
I have a solution with a lot of nunit tests in different projects. When I run resharpers testrunner, it finds all the tests. But when it comes to execution it simply marks them all as grey and silently completes.
How do I figure out whats wrong with the testrunner, and most importantly how do I get it to run my tests.
I have resharper 6 in visual studio 2008. My code is on a fileshare, and everything runs in a virtual machine.
Jetbrains has confirmed this to be a bug. That resharper wont run nunit tests located on a networkshare. They'll try to fix it in 6.1.
You can find the ticket here:
http://youtrack.jetbrains.net/issue/RSRP-275538
I am trying to figure out how I can hit breakpoints in my unit tests that are written with MbUnit/Gallio. I tried running Gallio.Icarus, attaching vs debugger to it, the breakpoints weren't hit.
Next I tried to start Gallio.Echo from project properties, but I was getting an error message, after supplying the dll, saying only .exe's can be tested.
The unit test runs fine from Gallio.Icarus, however, I am unable to debug them.
Thanks!
Grab Gallio v3.0.6 Update 1. Load up your tests and click on the shiny new "Debug" button in the Icarus GUI itself.
I would use TestDriven.Net for this. It supports MbUnit tests, and you can debug by simply right clicking from within Visual Studio
A much better answer is found here:
gallio test runner plugin to visual studio 2010
The answer is to add the following section to your *.csproj file the after the <ProjectGuid> section section:
<ProjectTypeGuids>
{3AC096D0-A1C2-E12C-1390-A8335801FDAB}
; {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
</ProjectTypeGuids>
See Also:
How Does Visual Studio Identiy test projects?
A list of supported VS2010 project types
Second list of GuIDs for supported project types