Resharper Test Runner - "Test wasn't run"
We recently ported our .NET solution from VS2010 / .NET 4.0 to use VS2012 / .NET 4.5. This includes many class library projects along with corresponding unit tests written using the MSFT test framework. The Microsoft test runner in VS2012 is flaky to say the least so thought I would give resharper 7.1 test runner ago. From the re-sharper unit test session window, I right click on the desired test and select "Debug Unit Tests". Re-sharper then shows "Inconclusive: Test wasn't run".
Here is the VS2012 output window after inconclusive test.
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
A first chance exception of type 'Microsoft.VisualStudio.TestTools.TestManagement.TestIdNotFoundException' occurred in Microsoft.VisualStudio.TestPlatform.Extensions.VSTestIntegration.dll
The thread '<No Name>' (0x2a3c) has exited with code 0 (0x0).
A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.VisualStudio.TestPlatform.TestExecutor.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.VisualStudio.TestPlatform.TestExecutor.Core.dll
The program '[10880] vstest.executionengine.x86.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
What am I doing wrong?
VS2012/ .NET 4.5
Configuration = X64
Resharper 7.1.25.234 C# Edition
Windows Server 2012
Please sign in to leave a comment.
Hello,
Thank you for the detailed report. We're investigating the Unit Testing issues in 7.1 now.
Hello,
Could you please try this build from here: http://download.jetbrains.com/resharper/ReSharperSetup.7.1.1000.338.msi.
It's a private dev build which includes some fixes for this issue.
Please let me know how it goes.
Thanks!
Hello Brian,
Yes. You're welcome to download and try it out too!
Please let me know if it works fine for you or not.
Thanks in advance!
Downloaded the new re-sharper you provided and the tests do seem to run now. However, ran into another issue (same issue that I had with Microsoft test runner in VS2012 that caused me to try Jetbrains). The new issue is that for some reason, the test runner / framework does not copy all of my DLL's from the bin folder to the test output folder.
http://connect.microsoft.com/VisualStudio/feedback/details/771138/vs2012-referenced-assemblies-in-unit-test-are-not-copied-to-the-unit-test-out-f
Thanks for the feedback.
Actually, ReSharper copies the behavior of VS native Test Runner, so if VS runner doesn't work, ReSharper will not ork either.
Thank you.
I don't believe that to be totally true b/c we were having the exact same issue:
DLL files that were copied to the bin folder of the unit test project were not being copied to the TestResults\out folder. This issue started ONLY after upgrading to 7.1.
We uninstalled 7.1 and installed 7.0.1 and it worked exactly as expected again.
Before uninstalling, we even tried all of the options referenced here (http://youtrack.jetbrains.com/issue/RSRP-335233#tab=Comments) including the private build of 7.1. None of them got our unit tests working again.
So, in short, I think ReSharper 7.1 is doing something slightly different than the stock behavior of the VS native Test Runner.
Actually, I may have to take back my previous statement.
After reinstalling 7.0.1, Resharper runs the tests without a problem. However, the native test runner still fails with the exact same error that we were seeing in 7.1. So, it looks like 7.0.1 was doing something custom with the tests and 7.1 implemented a clone of the native process.
We will investigate our tests further but for now, we're sticking with 7.0.1 b/c it either worked around the problem native test runner or it worked around the problem in our code. Either or both is a positive for us.
Oleg,
It was a 'bad luck' that ReSharper 7.0.1 was running the tests correctly, since there was a bug regarding MS API there. We've fixed it to use correct MS standards, as a result this is not happening anymore.
Currently, the easy way to check if there's a ReSharper bug or not: check if what you're trying to achieve is working with plain VS test runner. If it is working there, and is not working with ReSharper Test Engine - it is a bug in ReSharper. Otherwise, it is designed behavior.
Thank you.
Hi,
I'm also having problems using the R# Testrunner. No tests are executed, all
end up in a state of "Test inconclusive". I've already installed said build.
What can I do? Test executed fine with R# 7.0. The tests are also executed
under the Microsoft test runner.
Kind regards,
Henning Krause
"Alex Berezoutsky" wrote in message
news:24912951.9471353331534683.JavaMail.devnet@confluence.jetbrains.net...
Hello,
Could you please try this build from here:
http://download.jetbrains.com/resharper/ReSharperSetup.7.1.1000.338.msi.
It's a private dev build which includes some fixes for this issue.
Please let me know how it goes.
Thanks!
---
Original message URL: http://devnet.jetbrains.net/message/5472198#5472198
I'm getting the same issue with the same build. When I go to run or debug a test I either get a blank "Unit Test Sessions" window or it will momentarily display the tests it is supposed to run before showing going blank. I'm currently running VS2010.
JetBrains ReSharper 7.1.1 C# Edition
Build 7.1.1000.900 on 2012-12-13T21:22:48
I am running in to to the same issue on a project here. Before spending time working out the issues on this project I was wondering if there is a fix for this coming soon?
JetBrains ReSharper 7.1.1 Full Edition
Build 7.1.1000.900 on 2012-12-13T23:22:48
Hi Trent, hi Tyler,
Please upgrade to ReSHarper 7.1.2 and uncheck 'Use Legacy Runner' in the options: http://devnet.jetbrains.com/docs/DOC-1332.
Thanks!
That fixed it for me here. Thanks!!
I upgraded my Resharper as you stated, but I'm not seeing that option to disable the legacy test runner in mine. Am I missing something obvious?
JetBrains ReSharper 7.1.2 C# Edition
Build 7.1.2000.1478 on 2013-02-18T21:08:04
Hi Tyler,
Yes. Solution must be opened for this checkbox to be shown.
Hope it helps.
Thanks!
Yep, my solution is opened. I even restarted it to see if that made a difference and it didn't. This is all I am seeing.
It definitely has to to with MSTest. When I switch over to using NUnit, things appear to work fine.
Hi Tyler,
I believe you're using VS2010 under Windows XP? Please try to check 'Run tests with MSTest.exe' checkbox and check if it helps.
Thanks.
You are correct. The machine I am having problems with is running 32 bit XP.
I gave that option a try, but the test window still went from showing the tests back to blank. I will probably just stick with NUnit since that appears to be working fine.