Unit Test Sessions reports "Inconclusive: Test not run"

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!

16
78 comments

Hello Helen!

 

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?

Thank you.

1
Avatar
Permanently deleted user

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.

0

Hello Vincent!

 

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?

Thank you.

0
Avatar
Permanently deleted user

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.

 <ItemGroup>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>

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.

 

0
Avatar
Permanently deleted user
@AngelinaElycheva
Hello Gilad!

Thank you for contacting us.

Could you please specify what kind  test binaries you're using?

Please note that debugging 64-bit C++ test binaries could lead to inconclusive test status as ReSharper is not able to read the process output.

Thank you.

Hello Angelina,

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:

PROJECT_NAME.vcxproj.user

and then adding all the binaries I need, i.e:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<OPT_LIBS>C:\develop\libraries</OPT_LIBS>
</PropertyGroup>
<PropertyGroup Label="OPT_Binaries">
<BIN_BOOST>$(OPT_LIBS)\boost\1.67.0\$(PlatformTarget)-vc$(PlatformToolsetVersion)\$(Configuration)\bin</BIN_BOOST>
<BIN_ZLIB>$(OPT_LIBS)\zlib\1.2.11\$(PlatformTarget)-vc$(PlatformToolsetVersion)\$(Configuration)\bin</BIN_ZLIB>
<OPT_BIN>$(BIN_BOOST)%3b$(BIN_ZLIB)</OPT_BIN>
</PropertyGroup>
<PropertyGroup>
<LocalDebuggerEnvironment>PATH=$(OPT_BIN)%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
</Project>

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 :) 

0
Avatar
Permanently deleted user

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! 

0
Avatar
Permanently deleted user

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

 

0

Hello Albert!

 

The specified problem - https://youtrack.jetbrains.com/issue/RSRP-471333 will be fixed in upcoming ReSharper 2018.3.

Thank you.

0
Avatar
Permanently deleted user

Still happens for me:

xUnit 2.1.0

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...

1
Avatar
Permanently deleted user

Happening for me too.

Xunit 2.4.1,

VS Community 2017 15.9.3,

Resharper Ultimate 2018.2

1
Avatar
Permanently deleted user

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.

0
Avatar
Permanently deleted user

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.

1

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)

 

https://danielhillebrand.com/2017/09/inconclusive-error-in-resharper-unit-test-runner-caused-by-async-void/

Workaround, use Task.Result instead of await 

 

 

1

Hello Andrew!

 

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.

Thank you.

0
Avatar
Permanently deleted user

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.. 

1
Avatar
Permanently deleted user

Hi,

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.

0

Hello Mac!

 

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.

0

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!

Thank you!

1
Avatar
Permanently deleted user

Hey Igor,

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.

0
Avatar
Permanently deleted user

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.

0
Avatar
Permanently deleted user

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

Inconclusive

 

Thanks to providing ERRORs in top right corner, the issue was with App.config.

0
Avatar
Permanently deleted user

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=3.6.1.0, 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=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb' does not have an implementation.
at NUnit.Engine.Services.ExtensionService..ctor()
at NUnit.Engine.TestEngine.Initialize()
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

0
Avatar
Permanently deleted user

@Eric Brunel: try with latest nunit version? 3.6.1 is old.

0
Avatar
Permanently deleted user

my test projects use the last NUnit nuget package (3.11), how could i set the nunit engine used by resharper runner?

0
Avatar
Permanently deleted user

Thank you Jaroslav Majera, indeed, it solved the problem for me.

0
Avatar
Permanently deleted user

ReSharper 2019.1:

I took the clue from Leszek Pietrzak and removed all of the binding redirects from app.config...problem solved

0
Avatar
Permanently deleted user

ReSharper 2019.1

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)
{
// Arrange
_serviceMock.Setup(x => x.GetQuotesAsync(It.IsAny<ClaimsPrincipal>())).ReturnsAsync(GetQuotes(quoteId));

// Act
await _builder.BuildAsync(_coverListConfiguration, It.IsAny<ClaimsPrincipal>());

// Assert
_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

1

Hello Victor!

 

Could you please try ReSharper 2019.1.1 and check if the problem is still reproduced.

Thank you.

0
Avatar
Permanently deleted user

I using 2019.1.1

Please send me e-mail with your e-mail. I'll send you more information.

1

Please sign in to leave a comment.