Unit Test Sessions reports "Inconclusive: Test not run" Follow
I'm running into this problem quite frequently. Everything works, and then I run some tests and get the following error:
In the error log I see:
Rebuilding doesn't help, nor does closing and re-opening Visual Studio. Sometimes, if I click on a single unit test and run that, it works. It somewhat appears that I might get myself into this state if I run an entire session and one of the tests in that session fail. It's tough to really for sure, but mainly I'd like to understand what this error means and what "left pending" implies.
I'm running Visual Studio Pro 2017 (Version 15.5.6)
reSharper Ultimate 2017.3.2
MSTest.TestAdapter NuGet Package 1.1.18
MSTest.TestFramework NuGet Package 1.1.18
Any ideas would be helpful!
Please sign in to leave a comment.
The error messages says:
Unable to find tests for C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\MyTests.dll. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework version settings are appropriate.
Could you please check that all nuget packages with correspondent versions are included? Have you tried running tests using VS test runner?
Same issue, we have been unable to use resharper for testing in a very long time. I again updated today to the latest version and still inconclusive test in resharper, but MSTest runs fines.
This is not what we expect when having Ultimate version. I had also uploaded a file, and request a few weeks back but no one ever got back to me.
Thank you for the feedback.
As far as I see there was respond to your request from our support engineer, possibly it get in spam folder?
For what it's worth I also encountered this issue and tried all the suggested solutions to no avail. What I found is that i had the following settings in my test project which prevented my tests from being recognized.
I don't know how these were added but I didn't intentionally do it. I removed them and I am a happy camper now:)
Hope it helps.
Thanks for replying.
It looks like I was actually missing dlls in my PATH that VS couldn't load, therefore I got this error.
My workaround instead of setting manually in my System Environment Variables PATH the dlls, is creating a user defined project configuration like so:
and then adding all the binaries I need, i.e:
That way, it doesn't matter what configuration I set in VS(Debug,Release), it'll always pickup the right locations as long as they are set correctly in the directory structure on the local disk.
I also wanted to mention that debugging with x64 binaries worked perfectly fine for me.
I hope that helps some others in case anyone going through this.
Thanks again Angelina and to the JetBrains team :)
Hi Angelina, I figured out my problem. I was using a version of NUnit that wasn't compatible with .NET Core or .NET standard libraries without the Microsoft.NET.Test.Sdk. The clue was I was able to reproduce the issue even after resharper was uninstalled. Very sorry for wasting your time!
I have get also this message. But this help for me: In the Resharper Options "Tools"-"UnitTesting"-"NUnit" I have disabled "Use specified custom NUnit" option
The specified problem - https://youtrack.jetbrains.com/issue/RSRP-471333 will be fixed in upcoming ReSharper 2018.3.
Still happens for me:
Visual Studio Enterprise 2017 (version 15.8.7)
ReSharper Ultimate (version 2018.2.3)
When I run Visual Studio with elevated privileges, this issue is gone.
Tried all suggestions above - clean cache, restart VS, clean solution, physically remove bin/obj folders etc...
Happening for me too.
VS Community 2017 15.9.3,
Resharper Ultimate 2018.2
I finally resolved it by turning off MSBuild and replacing it with NUnit. No more problem. I hope this can help someone since I have yet to get a reply from my 2 request to support.
Late-joining to drop a line or two about some tweaks that got things working on our environment:
1. Update visual studio + resharper + unit testing libs (MSTest nugets etc) to their latest versions. Also make sure that if all of your test-dlls spawn on the same output folder that their respective mstest-nugets are aligned (same versions)
2. Make sure that the app.config of your test-projects exist and make sense in terms of EF and so on.
3. Shut down visual studio and perform a deep-clean on both system-wide temp-folders and on the temporary files of your source-code. Here are two powershell scripts to help you do exactly that:
$folders = @("bin", "obj", ".axoCover", ".vs", "more.folders.here")
gci -force -include $folders -recurse | remove-item -force -recurse
$tempfolders = @("C:\Windows\Temp\*", "C:\Windows\Prefetch\*", "C:\Documents and Settings\*\Local Settings\temp\*", "C:\Users\*\Appdata\Local\Temp\*")
Remove-Item $tempfolders -force -recurse
4. Double-check that the .vs folder has been wiped out (sometimes the scripts above fail to remove it for w/e reason). If it's not gone then delete by hand.
5. Re-open visual studio on your solution, restore nuget packages and run your tests. Everything should work now.
Hope this helps some people save some time.
Same issue here in latest Resharper (downloaded today,23rd Dec 2018)
Issue appears to be related to using async in tests (if you have to await a call)
Workaround, use Task.Result instead of await
Thank you for the feedback.
Please follow the correspondent issue reported here - https://youtrack.jetbrains.com/issue/RSRP-469158.
You are welcome to comment or vote for it.
Why after all these years... is this still a thing? Why? I think I have spent more time trying to get my tests to run via resharper than I have spent writing them. Running 2018.2.3 and .... yup.. open up an xunit 2.1.0 project and .. yup.. nothing works .. all inconclusive.. of a standard .net 4.7 project.
i just keep getting this error even after upgrading to 18.3.x
2019.02.14 16:05:03.809 WARN Exploration exceeded 30 seconds timeout. Continuing...
im just trying to run one little test.. .come on..
I was able to resolve all these problem by switching to NUnit. After the switching resharper no longer complains. Seem the Microsoft Unit testing framework and Resharper do not like each other. Do yourself a solid, and switch instead of trying to get it resolved.
Could you please run Visual Studio with the following command line: 'devenv /ReSharper.LogFile C:\resharper_log.txt /ReSharper.LogLevel Verbose', reproduce the issue and send us a corresponding 'resharper_log.txt' file. You can share it privately via "Submit a request" form.
Thanks in adnvance.
The same issue.
I create very simple cmake project in Visual Studio 2017.
Repository link: https://github.com/GillianGrayson/oqs/tree/test_issue (branch test issue).
I use Catch2 (resharper supports it) as git submodule. I tried different configurations but result the same:
Bu if i run tests using simple command ctest everything is ok!
Reharper team, please fix it!
Catch 2.6.1 broke R++'s test runner. While I've fixed that in Catch master (https://github.com/catchorg/Catch2/pull/1545), the single include version hasn't been updated yet. I'll ping the devs.
Please either rollback to Catch 2.6.0, or regenerate the single include version with Catch2\scripts\generateSingleHeader.py.
Catch 2.7.0 was released yesterday. It includes an up-to-date single include version and should resolve the issue with R++'s test runner.
2018.3.4 - still occurs.
Simple fresh Unit test net 4.5 project with simple tests that work in other similar project, but getting that yellow
Thanks to providing ERRORs in top right corner, the issue was with App.config.
I got the same issue when mixing C# project framework (.Net Standard 2.0 and .Net Framework 4.7.2).
I am using Resharper 2018.1.3
Following the error generated in resharper log file:
|W| UnitTestLaunch | :53 | System.TypeLoadException: Method 'get_TargetFramework' in type 'NUnit.Engine.Extensibility.ExtensionNode' from assembly 'nunit.engine, Version=18.104.22.168, Culture=neutral, PublicKeyToken=2638cd05610744eb' does not have an implementation.
System.TypeLoadException: Method 'get_TargetFramework' in type 'NUnit.Engine.Extensibility.ExtensionNode' from assembly 'nunit.engine, Version=22.214.171.124, Culture=neutral, PublicKeyToken=2638cd05610744eb' does not have an implementation.
at NUnit.Engine.TestEngine.GetRunner(TestPackage package)
at JetBrains.ReSharper.UnitTestRunner.nUnit30.BuiltInNUnitRunner.<>c__DisplayClass5_0.<RunTests>b__0() in C:\Build Agent\work\10c2e82a8ca40a4\Psi.Features\UnitTesting\nUnit\Runner30\Src\BuiltInNUnitRunner.cs:line 89
at JetBrains.ReSharper.UnitTestRunner.nUnit30.BuiltInNUnitRunner.WithExtensiveErrorHandling(IRemoteTaskServer server, Action action) in C:\Build Agent\work\10c2e82a8ca40a4\Psi.Features\UnitTesting\nUnit\Runner30\Src\BuiltInNUnitRunner.cs:line 862
@Eric Brunel: try with latest nunit version? 3.6.1 is old.
my test projects use the last NUnit nuget package (3.11), how could i set the nunit engine used by resharper runner?
It should be solved by https://github.com/Microsoft/vstest/issues/1757. Try latest https://www.nuget.org/packages/Microsoft.NET.Test.Sdk/.
Thank you Jaroslav Majera, indeed, it solved the problem for me.
I took the clue from Leszek Pietrzak and removed all of the binding redirects from app.config...problem solved
Some tests look like this one
[TestCase(null, TestName = "BuildAsync_When_QuoteId_Is_Null_Calls_Logger")]
[TestCase("", TestName = "BuildAsync_When_QuoteId_Is_Empty_Calls_Logger")]
public async Task BuildAsync_When_QuoteId_Is_Empty_Calls_Logger(string quoteId)
_serviceMock.Setup(x => x.GetQuotesAsync(It.IsAny<ClaimsPrincipal>())).ReturnsAsync(GetQuotes(quoteId));
await _builder.BuildAsync(_coverListConfiguration, It.IsAny<ClaimsPrincipal>());
_loggerMock.Verify(x => x.LogTrackTrace(It.IsAny<string>(), SeverityLogLevel.Error), Times.Once);
I have tried to update NUnit to 3.12 but it does not help me
Could you please try ReSharper 2019.1.1 and check if the problem is still reproduced.
I using 2019.1.1
Please send me e-mail with your e-mail. I'll send you more information.