Resharper 6 simply ignores all my tests - visual-studio

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

Related

DEVENV Command line build fails with: "This operation may only take place in the UI thread"

we virtualized our build server and having issues building some c++ projects.
It is a win7 (we have some vb6 projects) with visual studio 2017.
When I build a project it just errors out with "This operation may only take place in the UI thread".
Also it is completely random...sometimes it compiles, sometimes it does not.
I have no idea why and what I could try to fix it. I have also a Win10 build machine where the problem does not happen. We want to stick with the Win7 build machine though, because on the Win10 one we got issues with some vb6 projects.
If I use msbuild it works fine, I would rather not replace all devenv calls for now though.
Anyone an idea what the issue could be or how to debug it?
Seems to be an issue with Visual Studio 2017 15.6.x. works fine with 15.5.7

VS 2015 Test Explorer is empty

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%\Micr‌​osoft\VisualStudio\12‌.0\ComponentModelCach‌​e
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.

How to figure out why ReSharper is not rebuilding unit test project before running?

Recently I am having an annoying problem. When I go to Unit Test Sessions window and run some tests, ReSharper seems to completely ignore any changes in my code(even in the code of the test itself!) and does not rebuild anything. Because of that I have to rebuild everything manually. I think that problem is too generic to post on bug-tracker so I would like to find at least any additional information. For MsBuild I can always enable diagnostic logging and track all its decisions during build. How can I find what is the problem with ReSharper?
Versions:
Visual Studio 2015 Pro Update 2; ReSharper Ultimate 2016.1.2.
Have you installed the Rider EAP by any chance? There is a bug in the latest EAP (EAP7) that sets the build action before running tests to "Never", and since the global settings file is shared between Rider and ReSharper, this also causes ReSharper to not build tests before running. The fix is simple - just change the value in the drop down in the unit test runner window. See the bug report for more details.
One thing I'm not sure on is if this is a recurring issue - i.e. the value gets reset to "Never" every time Rider opens the unit testing window. This is an unfortunate bug, and will definitely be fixed for EAP8.

Test execution error in Visual Studio 2015 (worked in 2013)

We are in the process of upgrading from Visual Studio 2013 Update 5 to Visual Studio 2015 Update 1.
Our Solution has many tests and we use NUnit 2.6.4, along with the NUnit Test Adapter for NUnit 2.x.
When running these tests in Visual Studio 2013, they all run perfectly well.
However, when running in Visual Studio 2015 the first 200 odd tests run, then execution stops. I can then select the tests that have not yet run and successfully execute these. I have the latest ReSharper installed in both VS2013 and VS2015 and it happily executes all the tests.
We've been keeping test-coverage details for each release since the dawn of time, and from Visual Studio's test runner it shows me the number of blocks covered. But ReSharper shows us the number of statements covered. Slightly different values, but they'd mess up our charts.
When test execution fails, it creates a Dump file (it also creates some XML files that just seem to show what DLLs I've installed). I can open this and "debug" it, but it simply shows me a line of code that fails, and the call stack shows only [Managed Code], which means I can't identify the actual test that's causing the issue.
The fact that this works perfectly in VS2013 and in ReSharper running in VS2015 suggests that "it's not our fault", but whilst I'd like to think that, it doesn't help me fix this.
Any ideas?
Thanks
Griff
Tracked down the problem. We had one class in our Solution that implements IDispose and one of our Unit tests didn't dispose of that class, it just allowed it to go out of scope.
So because the Disposable object hadn't been disposed, the class' Finalizer hadn't been suppressed. The GC therefore called the Finalizer which in turn attempted to access another object that had also gone out of scope, resulting in an exception that crashed the Test Execution Runner.
Interesting that VS2015 running NUnit 2.x crashes, but the identical setup in VS2013 copes fine.
As an aside, when debugging the DUMP file (see above), I realized that the call stack was irrelevant, I just had to put in some defensive coding in the Finalizer.

VS2013 Resharper always runs all tests

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.

Resources