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!
Please sign in to leave a comment.
@Roland Oldengarm and @Michael Milgevkiy
There is an inherent problem in usage of DateTime.Now as well as any other source that return a different value on every call. That means that each time NUnit executes discovery, new test-case will be created with id not matching to test-cases previously produced by the same method. An attempt to execute such test-case using 'vstest' (which is how we run tests that target .netcoreappXX) will ultimately fail, because at the time of running, there won't be such test-case.
Because of this and number of other issues with vstest runner, we are going to implement our own runner for projects targeting .netcoreappXX.
Hello Michael!
Thank you for contacting us.
Could you please try clearing and rebuilding solution and check if it help?
If the problem persists please start VS with the following command: 'devenv /ReSharper.LogFile C:\log\resharper_log.txt /ReSharper.LogLevel Verbose', reproduce the issue and send log file to us (via 'Sumbit a request' form).
Thank you.
Sure. Did a clean then rebuild. Sending you the file now.
Thanks again! Ticket #1259424
Any update on this?
Are you including MSTest.TestAdapter in that specifik project? It compiles fine and works in Visual Studios testrunner without it.
I've had the same problem when it wasn't included. As soon as I added the package it works...
Yup, here's my packages.config file on that particular project:
Even when I do a complete rebuild, this occurs on most of my tests. I am using .Net Core 2.1 with a targetFramework of netcoreapp2.0. I disabled the shadow copy. MSTest.TestAdapter and MSTestFramework are in the PackageReference(s), although mine are version 1.2.0. I am using the latest version of Visual Studio and Resharper (not beta).
Even when it works, if I click on the test and then the panel to the right, it wipes out the results, clearing the panel, and switches it to "Inconclusive". It would be great if there were a better error message as to WHY it is "Inconclusive".
I will follow your directions for creating the log file and submit it.
Bug occurs with new Resharper version too:
MS Test Unit Tests can be executed, but not debugged. Error: Inconclusive. Test not run
We are using Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll Version 10.0.0
JetBrains ReSharper Ultimate 2018.1 Build 112.0.20180414.70444
ReSharper 2018.1.20180414.71556
Visual Studio: 15.6.4.
Hello Stgu!
Thank you for the feedback.
Is there any chance you could provide us a sample solution demonstrating the issue? You can do it privately via 'Sumbit a request' form.
Thank you.
This is just another data point. This problem was getting really hard to deal with, and then I got a notification of an update to 2017.3.5 build on 2018-03.23. So I installed it and all my problems went away! Yeah! The Visual Studio version is Enterprise 2017 (version 15.5.27130.0).
I have started getting a similar issue the last few days using 2018.1.
I have a suite of XUnit tests, which have been working fine for the past year.
Now, when I choose "Run All Tests from Solution", nothing appears to happen. The Unit Test window doesn't even open. If I manually open the Unit Test window (Ctrl+Alt+R), the tests look like they are trying to run: the 'loading' bar is animated, and the "Run" icons are disabled. However there is no indication of any activity other than that, and even after a few minutes of waiting, the tests never run. The "Stop" buttons are also disabled, so I have to restart Visual Studio to stop the test runner doing whatever it thinks it's doing.
Like the original post, sometimes I am able to run individual or groups of tests successfully by clicking "Run" in the Unit Test session window. This then seems to cause Resharper to start behaving normally again. However this is not always the case, and sometimes individual tests will not run. I haven't worked out what causes it to behave differently sometimes.
I am seeing this too, but only on static methods of a small static utility class I have for modifying strings. I can run the tests just fine individually, but not reliably by running "all" tests for a c# file, project, or solution. I have had issues like this before with ReSharper and XUnit (not always with static types). It is a recurring problem that seemingly emerges from time to time.
17:05:42.647 |W| UnitTestLaunch | :43 | Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Span`1 destination) at System.Net.Sockets.NetworkStream.ReadByte() at System.IO.BinaryReader.ReadByte() at System.IO.BinaryReader.Read7BitEncodedInt() at System.IO.BinaryReader.ReadString() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action`1 errorHandler, CancellationToken cancellationToken) Source: System.Net.Sockets HResult: -2146232800 Inner Exception: An existing connection was forcibly closed by the remote host HResult: -2147467259
--- EXCEPTION #1/1 [LoggerException]
Message = “
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
at System.Net.Sockets.NetworkStream.Read(Span`1 destination)
at System.Net.Sockets.NetworkStream.ReadByte()
at System.IO.BinaryReader.ReadByte()
at System.IO.BinaryReader.Read7BitEncodedInt()
at System.IO.BinaryReader.ReadString()
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable()
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action`1 errorHandler, CancellationToken cancellationToken)
Source: System.Net.Sockets
HResult: -2146232800
Inner Exception: An existing connection was forcibly closed by the remote host
HResult: -2147467259
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestExecution.OnRunComplete(ExecutionCompletePayload payload)
at Appccelerate.StateMachine.Machine.ActionHolders.ArgumentActionHolder`1.Execute(Object argument)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.PerformActions(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(IState`2 source, IState`2 target, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(IState`2 source, IState`2 target, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(IState`2 source, IState`2 target, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.Fire(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.StateMachine`2.Fire(TEvent eventId, Object eventArgument)
at Appccelerate.StateMachine.ActiveStateMachine`2.ProcessEventQueue(CancellationToken cancellationToken)
at Appccelerate.StateMachine.ActiveStateMachine`2.<Start>b__32_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork(Object obj)
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
”
17:05:42.646 |E| XunitDotNetVsTestRunStrategy | :43 | Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Span`1 destination) at System.Net.Sockets.NetworkStream.ReadByte() at System.IO.BinaryReader.ReadByte() at System.IO.BinaryReader.Read7BitEncodedInt() at System.IO.BinaryReader.ReadString() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action`1 errorHandler, CancellationToken cancellationToken) Source: System.Net.Sockets HResult: -2146232800 Inner Exception: An existing connection was forcibly closed by the remote host HResult: -2147467259
--- EXCEPTION #1/1 [LoggerException]
Message = “
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
at System.Net.Sockets.NetworkStream.Read(Span`1 destination)
at System.Net.Sockets.NetworkStream.ReadByte()
at System.IO.BinaryReader.ReadByte()
at System.IO.BinaryReader.Read7BitEncodedInt()
at System.IO.BinaryReader.ReadString()
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable()
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action`1 errorHandler, CancellationToken cancellationToken)
Source: System.Net.Sockets
HResult: -2146232800
Inner Exception: An existing connection was forcibly closed by the remote host
HResult: -2147467259
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestExecution.OnRunComplete(ExecutionCompletePayload payload)
at Appccelerate.StateMachine.Machine.ActionHolders.ArgumentActionHolder`1.Execute(Object argument)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.PerformActions(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(IState`2 source, IState`2 target, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(IState`2 source, IState`2 target, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(IState`2 source, IState`2 target, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.Fire(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.StateMachine`2.Fire(TEvent eventId, Object eventArgument)
at Appccelerate.StateMachine.ActiveStateMachine`2.ProcessEventQueue(CancellationToken cancellationToken)
at Appccelerate.StateMachine.ActiveStateMachine`2.<Start>b__32_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork(Object obj)
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
”
Same issues here
The issue I mentioned above seems to be better after upgrading my project's references to xunit and xunit.runner.visualstudio to the latest version.
Sorry, I spoke too soon. I am still receiving the issue, even after upgrading the xunit DLLs. It is quite intermittent though, and I haven't figured out a reliable work around, other than restarting Visual Studio, lots of cleaning and rebuilding etc.
I have the same problem since I updated to ReSharper 2018.1 Things were working fine until then.
I have VS 15.6.6. I am wondering will updating to visual studio 15.6.7 make it better or worse?
Started having the same issue using NUnit for all tests using TestCaseSource attribute. Sometimes they would still run, but in most case would get the error as others mention.
JetBrains ReSharper Ultimate 2018.1 Build 112.0.20180414.70444
dotCover 2018.1.20180414.124358
dotTrace 2018.1.20180414.71711
ReSharper 2018.1.20180414.71556
dotMemory 2018.1.20180414.71710
Visual Studio Professional 2017 (version 15.5.27130.2036).
UPDATE: Seems like it only happens for generic test methods, like:
[TestCaseSource(nameof(ValuesToCache))]
public void Get_GivenValueWasPut_ReturnsValueThatWasPut<T>(T value)
Try to debug the failing test. I discovered that way that this exception was caused by a StackOverflowException in one of my tested methods. See also https://youtrack.jetbrains.com/issue/RSRP-470510
This could be caused by other test session being still active somewhere in background. Verify you don't have 'dotnet' stale processes running in background.
I am having the same problem. I submitted a bug for this way back in April (4 months ago), and as far as I can tell, no one has looked at it yet.
https://youtrack.jetbrains.com/issue/RSRP-469301
I am seeing that when I run all unit tests for an entire project, I get about half of the 70 tests failing, but when I run each of those tests individually, they all pass just fine. The same thing happens when I run "Cover All Tests From Solution". The same projects show about half of the tests failing, but when I run the tests individually, they pass.
@Seansinykin I ran into the same issue when your test fixture class retains some sort of a context between tests. If you run them individually the fixture is created and destroyed. But if you run them all, the context is retained and may cause your tests to fail. To avoid this you can create all the context, like mocks etc., in the setup method. This way it will be recreated for each test.
Hello!
Thank you all for your feedback.
To begin with let me suggest to try the latest ReSharper 2018.2 EAP build and check if the problem is still reproduced - https://www.jetbrains.com/resharper/eap/
Thank you.
Hi,
unfortunately the issue still persists in my case after updating Resharper to said EAP version.
Still an issue here with Resharper 18.2.1. Come on guys get this fixed! This is the only reason I PAY you guys every damn year for my license.
This also happened to me. While I was doing a timed technical test for an interview. Thanks a lot guys.
I tried with a .NET Core 2.0 class library and also a .NET framework one.
I tried restarting visual studio. I updated resharper to the latest version (Resharper ultimate 2018.2.1 built on 29-08-2018). Still have the same problem.
I cleared the cache and restarted visual studio. Still happened.
I'm using NUnit 3.10.1.
Here is the resharper output:
21:40:23.429 |I| RemoteInstancesManager | :1 | Registering process in ROT: dotTrace.Viewers.21052, Process name: devenv
21:40:24.838 |I| dotMemoryIdeNavigationHost | :58 | Initializing the host, lifetime: 56383790, address: net.pipe://localhost/dotMemory/ideNavigation/21052
21:40:24.856 |I| SilentCleanupComponent | :1 | Starting silent cleanup component
21:40:24.858 |I| SilentCleanupComponent | :1 | Checking location C:\Users\helen\AppData\Local\JetBrains\Shared\vAny\Cache, lifespan 30.00:00:00. Will delete directories older than 05/08/2018 20:40:24
21:40:37.513 |I| IndicatorsItemsControl | :1 | ResizeGrip. ResizeGripControl
21:40:37.517 |I| IndicatorsItemsControl | :1 | Panel = StatusBarPanel - DockPanel
21:40:37.548 |I| IndicatorsItemsControl | :1 | TrySubclass. Take 2. OK
21:40:50.363 |I| VsSolutionManager15 | :1 | VSSolutionManager::VsSolutionWrapperLifetimes: Solution instance created 58038318
21:40:57.234 |I| TriggerSolutionBuildAfterOpen | :1 | not requested
21:40:57.234 |I| TriggerSolutionBuildAfterOpen | :1 | not requested at all
21:40:57.234 |I| TriggerSolutionBuildAfterOpen | :1 | !buildRequested
21:40:57.816 |I| IncrementalBuildTrigger | :1 | New current runner JetBrains.VsIntegration.IDE.SolutionBuilder.VsSolutionBuilderRunner
21:40:57.817 |I| IncrementalBuildTrigger | :1 | Runner isReady = true
21:40:57.817 |I| IncrementalBuildTrigger | :1 | !myShouldBuild
21:40:58.008 |I| PreloadedCoverageTaskRunnersPool| :1 | Runner list updated: 0 runners created, 0 runners killed. Total runners: 0
21:40:58.968 |I| VsSolutionManager15 | :1 | VSSolutionManager::VsSolutionWrapperLifetimes: Solution load done 58038318. Lifetime.IsTerminated=False
21:40:59.010 |I| PathMappingRootProvider | JetPool(S) #1:23 | Found solution root: for 10 ms
21:41:01.724 |I| PreloadedCoverageTaskRunnersPool| :1 | Runner list updated: 0 runners created, 0 runners killed. Total runners: 0
21:41:03.498 |I| InitialExplorationTask | JetPool(S) #7:29 | Initial unit-test exploration started
21:41:03.524 |I| ContinuousTestingIndicatorVisibilityDetector| :1 | Initializing continuous testing indicator
21:41:03.558 |I| PreparedProcess | JetPool(S) #7:29 | Starting process: dotnet "--version"
21:41:03.563 |I| PreparedProcess | JetPool(S) #7:29 | Started process with pid 16664
21:41:03.651 |I| PreparedProcess | JetPool(S) #7:29 | Process dotnet:16664 has exited with code (0)
Output stream: 2.1.201
Error stream:
21:41:03.817 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | Starting process: dotnet "vstest" /port:50255
21:41:03.820 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | Started process with pid 15480
21:41:03.828 |I| PsiChangesListener | :1 | Ranges building started
21:41:04.124 |I| JsonBasedUnitTestServer | :92 | 127.0.0.1:50256 connected
21:41:04.209 |I| JsonBasedRemoteChannel | :91 | Sending message 'ProtocolVersion'
21:41:04.209 |I| JsonBasedRemoteChannel | :91 | Sent message 'ProtocolVersion'
21:41:04.222 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | Discovery started for MyTests.dll. Attempt #1
21:41:04.223 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | Using test adapter: C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll
21:41:04.223 |W| NUnitDotNetVsTestArtefactsExplorer| :91 | File C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll does not exist on disk
21:41:04.231 |I| JsonBasedRemoteChannel | :91 | Sending message 'Extensions.Initialize'
21:41:04.231 |I| JsonBasedRemoteChannel | :91 | Sent message 'Extensions.Initialize'
21:41:04.233 |I| JsonBasedRemoteChannel | :91 | Sending message 'TestDiscovery.Start'
21:41:04.233 |I| JsonBasedRemoteChannel | :91 | Sent message 'TestDiscovery.Start'
21:41:04.310 |W| NUnitDotNetVsTestArtefactsExplorer| :91 | System.IO.FileNotFoundException: 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. Rerun with /diag option to diagnose further.
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.GetTestHostProcessStartInfo(IEnumerable`1 sources, IDictionary`2 environmentVariables, TestRunnerConnectionInfo connectionInfo)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
21:41:04.326 |W| NUnitDotNetVsTestArtefactsExplorer| :91 | Discovery ABORTED for MyTests.dll. Restarting...
21:41:04.393 |I| PsiChangesListener | :1 | Ranges building completed
21:41:06.326 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | Discovery started for MyTests.dll. Attempt #2
21:41:06.326 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | Using test adapter: C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll
21:41:06.326 |W| NUnitDotNetVsTestArtefactsExplorer| :91 | File C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll does not exist on disk
21:41:06.326 |I| JsonBasedRemoteChannel | :91 | Sending message 'Extensions.Initialize'
21:41:06.326 |I| JsonBasedRemoteChannel | :91 | Sent message 'Extensions.Initialize'
21:41:06.326 |I| JsonBasedRemoteChannel | :91 | Sending message 'TestDiscovery.Start'
21:41:06.326 |I| JsonBasedRemoteChannel | :91 | Sent message 'TestDiscovery.Start'
21:41:06.330 |W| NUnitDotNetVsTestArtefactsExplorer| :91 | System.IO.FileNotFoundException: 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. Rerun with /diag option to diagnose further.
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.GetTestHostProcessStartInfo(IEnumerable`1 sources, IDictionary`2 environmentVariables, TestRunnerConnectionInfo connectionInfo)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
21:41:06.331 |W| NUnitDotNetVsTestArtefactsExplorer| :91 | Discovery ABORTED for MyTests.dll. Restarting...
21:41:07.459 |I| UnitTestSessionRepository | JetPool(S) #7:29 | << (Opening) Loading sessions from persistent storage
21:41:07.459 |I| UnitTestSessionRepository | JetPool(S) #7:29 | << (Closing) Loading sessions from persistent storage
21:41:09.332 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | Discovery started for MyTests.dll. Attempt #3
21:41:09.332 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | Using test adapter: C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll
21:41:09.332 |W| NUnitDotNetVsTestArtefactsExplorer| :91 | File C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll does not exist on disk
21:41:09.332 |I| JsonBasedRemoteChannel | :91 | Sending message 'Extensions.Initialize'
21:41:09.332 |I| JsonBasedRemoteChannel | :91 | Sent message 'Extensions.Initialize'
21:41:09.332 |I| JsonBasedRemoteChannel | :91 | Sending message 'TestDiscovery.Start'
21:41:09.333 |I| JsonBasedRemoteChannel | :91 | Sent message 'TestDiscovery.Start'
21:41:09.380 |W| NUnitDotNetVsTestArtefactsExplorer| :91 | System.IO.FileNotFoundException: 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. Rerun with /diag option to diagnose further.
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.GetTestHostProcessStartInfo(IEnumerable`1 sources, IDictionary`2 environmentVariables, TestRunnerConnectionInfo connectionInfo)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
21:41:09.381 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | Discovery ABORTED for MyTests.dll: -1 tests found
21:41:09.381 |I| JsonBasedRemoteChannel | :91 | Sending message 'TestSession.Terminate'
21:41:09.381 |I| JsonBasedRemoteChannel | :91 | Sent message 'TestSession.Terminate'
21:41:09.382 |I| JsonBasedRemoteChannel | :54 | Can't read a string from the stream (Abort = False)
21:41:09.404 |I| NUnitDotNetVsTestArtefactsExplorer| :13 | Process dotnet:15480 has exited with code (0)
Output stream: Microsoft (R) Test Execution Command Line Tool Version 15.7.0
Copyright (c) Microsoft Corporation. All rights reserved.
Error stream:
21:41:09.407 |I| NUnitDotNetVsTestArtefactsExplorer| :91 | dotnet exited
21:41:09.420 |I| InitialExplorationTask | JetPool(S) #7:29 | Initial unit-test exploration completed
21:41:10.473 |I| PreloadedCoverageTaskRunnersPool| :1 | Runner list updated: 1 runners created, 0 runners killed. Total runners: 1
21:41:11.802 |I| PreloadedCoverageTaskRunner | JetPool(S) #7:29 | Created preloaded task runner 6d9099ba-05a0-4191-927d-fa7f604ebc60. Process Id: 29228
21:41:11.981 |I| BaseHostProfile | BridgeCoreThread:78 | Executable='C:\Users\helen\AppData\Local\JetBrains\Installations\ReSharperPlatformVs15_e22a8608\JetBrains.ReSharper.TaskRunner.CLR4.x64.exe' (non-child) is being passed for filtering
21:41:11.982 |I| BaseHostProfile | BridgeCoreThread:78 | Passed filter executable='C:\Users\helen\AppData\Local\JetBrains\Installations\ReSharperPlatformVs15_e22a8608\JetBrains.ReSharper.TaskRunner.CLR4.x64.exe'
21:41:12.161 |I| UnitTestServer | :85 | 127.0.0.1:50262 connected
21:41:52.465 |I| UnitTestSessionRepository | :1 | Create unit-test session 'Session::Name=CanViewAll' (5f37088c-aa77-423d-8d6e-7d202db1bc28)
21:41:52.519 |I| UnitTestLaunch | :1 | Host Controller: RunHostController
21:41:52.568 |I| UnitTestLaunch | :90 | BuildStage started
21:41:52.574 |I| UnitTestLaunch | :90 | Build policy: Automatic
21:41:52.591 |I| UnitTestSolutionBuilder | :1 | Got request to build 1 projects (BuildPolicy: Automatic)
21:41:52.591 |I| UnitTestSolutionBuilder | :1 | Building 1 projects
21:41:54.443 |I| UnitTestLaunch | :1 | 1 projects built
21:41:54.444 |I| UnitTestLaunch | :96 | BuildStage completed
21:41:54.451 |I| UnitTestLaunch | :1 | RefreshProjectPropertiesStage started
21:41:54.452 |I| UnitTestLaunch | :1 | RefreshProjectPropertiesStage completed
21:41:54.452 |I| UnitTestLaunch | :42 | DiscoveryStage started
21:41:54.455 |I| UnitTestLaunch | :42 | Test exploration required for 1 projects
21:41:54.456 |I| UnitTestLaunch | :42 | DiscoveryStage completed
21:41:54.456 |I| UnitTestLaunch | :42 | BuildPipelineStage started
21:41:54.459 |I| UnitTestLaunch | :42 | BuildPipelineStage completed
21:41:54.459 |I| UnitTestLaunch | :42 | ApplyRulesStage started
21:41:54.469 |I| UnitTestLaunch | :42 | Got 5 elements (1 explicit) to run
21:41:54.551 |I| UnitTestLaunch | :42 | Created 1 unit-test runs
21:41:54.551 |I| UnitTestLaunch | :42 | ApplyRulesStage completed
21:41:54.551 |I| UnitTestLaunch | :60 | RunTestsStage started
21:41:54.552 |I| UnitTestLaunch | :60 | Running up to 1 unit-test runs in parallel
21:41:54.558 |I| UnitTestLaunch | :60 | Run: eff40a72-ad0d-40e2-8acf-2436254cf2d1 - Starting
21:41:54.581 |I| UnitTestLaunch | :15 | [ProcessStartInfoPatchResult]
Original request: DotNetCoreRequest
Success: True
ErrorMessage: <Empty>
Original StartInfo: FileName = 'vstest', Arguments = '/port:50267 ', WorkDir = 'C:\code\InterviewTests\MyTests'
Patched StartInfo: FileName = 'dotnet', Arguments = '"vstest" /port:50267 ', WorkDir = 'C:\code\InterviewTests\MyTests'
21:41:54.581 |I| NUnitDotNetVsTestRunStrategy | :15 | [ProcessStartInfoPatchResult]
Original request: DotNetCoreRequest
Success: True
ErrorMessage: <Empty>
Original StartInfo: FileName = 'vstest', Arguments = '/port:50267 ', WorkDir = 'C:\code\InterviewTests\MyTests'
Patched StartInfo: FileName = 'dotnet', Arguments = '"vstest" /port:50267 ', WorkDir = 'C:\code\InterviewTests\MyTests'
21:41:54.581 |I| UnitTestLaunch | :15 | Starting process: dotnet "vstest" /port:50267
21:41:54.581 |I| NUnitDotNetVsTestRunStrategy | :15 | Starting process: dotnet "vstest" /port:50267
21:41:54.584 |I| UnitTestLaunch | :15 | Started process with pid 9196
21:41:54.584 |I| NUnitDotNetVsTestRunStrategy | :15 | Started process with pid 9196
21:41:54.735 |I| UnitTestSessionConductor | :1 | Create unit-test session view model 'Session::Name=CanViewAll' (5f37088c-aa77-423d-8d6e-7d202db1bc28)
21:41:54.831 |I| JsonBasedUnitTestServer | :66 | 127.0.0.1:50268 connected
21:41:54.907 |I| JsonBasedRemoteChannel | :15 | Sending message 'ProtocolVersion'
21:41:54.907 |I| JsonBasedRemoteChannel | :15 | Sent message 'ProtocolVersion'
21:41:54.918 |I| UnitTestLaunch | :15 | Using test adapter: C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll
21:41:54.918 |I| NUnitDotNetVsTestRunStrategy | :15 | Using test adapter: C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll
21:41:54.918 |W| UnitTestLaunch | :15 | File C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll does not exist on disk
21:41:54.918 |W| NUnitDotNetVsTestRunStrategy | :15 | File C:\code\InterviewTests\MyTests\bin\Debug\netcoreapp2.0\NUnit3.TestAdapter.dll does not exist on disk
21:41:54.918 |I| JsonBasedRemoteChannel | :15 | Sending message 'Extensions.Initialize'
21:41:54.918 |I| JsonBasedRemoteChannel | :15 | Sent message 'Extensions.Initialize'
21:41:55.018 |W| UnitTestLaunch | :15 | Transition failed: Transition from state <HandShake> on event <remote::.ProtocolVersion>. Cause: System.InvalidOperationException: Test-cases are missing for the selected tests. Rebuild the project and try again. at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestExecution.SendGetProcessStartInfo() at Appccelerate.StateMachine.Machine.ActionHolders.ArgumentLessActionHolder.Execute(Object argument) at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryAction(IActionHolder actionHolder, ITransitionContext`2 context)
--- EXCEPTION #1/1 [LoggerException]
Message = “
Transition failed: Transition from state <HandShake> on event <remote::.ProtocolVersion>.
Cause: System.InvalidOperationException: Test-cases are missing for the selected tests. Rebuild the project and try again.
at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestExecution.SendGetProcessStartInfo()
at Appccelerate.StateMachine.Machine.ActionHolders.ArgumentLessActionHolder.Execute(Object argument)
at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryAction(IActionHolder actionHolder, ITransitionContext`2 context)
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestProtocol.<.ctor>b__22_9(Object sender, TransitionExceptionEventArgs`2 args)
at Appccelerate.StateMachine.Machine.StateMachine`2.RaiseEvent[T](EventHandler`1 eventHandler, T arguments, ITransitionContext`2 context, Boolean raiseEventOnException)
at Appccelerate.StateMachine.Machine.StateMachine`2.OnExceptionThrown(ITransitionContext`2 context, Exception exception)
at Appccelerate.StateMachine.Machine.Contexts.TransitionContext`2.OnExceptionThrown(Exception exception)
at Appccelerate.StateMachine.Machine.States.State`2.HandleException(Exception exception, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.HandleEntryActionException(ITransitionContext`2 context, Exception exception)
at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryAction(IActionHolder actionHolder, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryActions(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.Entry(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.EnterShallow(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.EnterHistoryNone(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.EnterByHistory(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.Fire(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.StateMachine`2.Fire(TEvent eventId, Object eventArgument)
at Appccelerate.StateMachine.ActiveStateMachine`2.ProcessEventQueue(CancellationToken cancellationToken)
at Appccelerate.StateMachine.ActiveStateMachine`2.<Start>b__32_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork(Object obj)
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
”
21:41:54.933 |E| NUnitDotNetVsTestRunStrategy | :15 | Transition failed: Transition from state <HandShake> on event <remote::.ProtocolVersion>. Cause: System.InvalidOperationException: Test-cases are missing for the selected tests. Rebuild the project and try again. at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestExecution.SendGetProcessStartInfo() at Appccelerate.StateMachine.Machine.ActionHolders.ArgumentLessActionHolder.Execute(Object argument) at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryAction(IActionHolder actionHolder, ITransitionContext`2 context)
--- EXCEPTION #1/1 [LoggerException]
Message = “
Transition failed: Transition from state <HandShake> on event <remote::.ProtocolVersion>.
Cause: System.InvalidOperationException: Test-cases are missing for the selected tests. Rebuild the project and try again.
at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestExecution.SendGetProcessStartInfo()
at Appccelerate.StateMachine.Machine.ActionHolders.ArgumentLessActionHolder.Execute(Object argument)
at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryAction(IActionHolder actionHolder, ITransitionContext`2 context)
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestProtocol.<.ctor>b__22_9(Object sender, TransitionExceptionEventArgs`2 args)
at Appccelerate.StateMachine.Machine.StateMachine`2.RaiseEvent[T](EventHandler`1 eventHandler, T arguments, ITransitionContext`2 context, Boolean raiseEventOnException)
at Appccelerate.StateMachine.Machine.StateMachine`2.OnExceptionThrown(ITransitionContext`2 context, Exception exception)
at Appccelerate.StateMachine.Machine.Contexts.TransitionContext`2.OnExceptionThrown(Exception exception)
at Appccelerate.StateMachine.Machine.States.State`2.HandleException(Exception exception, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.HandleEntryActionException(ITransitionContext`2 context, Exception exception)
at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryAction(IActionHolder actionHolder, ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryActions(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.Entry(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.EnterShallow(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.EnterHistoryNone(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.EnterByHistory(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.Transitions.Transition`2.Fire(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.States.State`2.Fire(ITransitionContext`2 context)
at Appccelerate.StateMachine.Machine.StateMachine`2.Fire(TEvent eventId, Object eventArgument)
at Appccelerate.StateMachine.ActiveStateMachine`2.ProcessEventQueue(CancellationToken cancellationToken)
at Appccelerate.StateMachine.ActiveStateMachine`2.<Start>b__32_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork(Object obj)
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
”
21:41:55.059 |I| JsonBasedRemoteChannel | :15 | Sending message 'TestSession.Terminate'
21:41:55.059 |I| JsonBasedRemoteChannel | :15 | Sent message 'TestSession.Terminate'
21:41:55.060 |I| JsonBasedRemoteChannel | :87 | Can't read a string from the stream (Abort = False)
21:41:55.078 |I| UnitTestLaunch | :99 | Process dotnet:9196 has exited with code (0)
Output stream: Microsoft (R) Test Execution Command Line Tool Version 15.7.0
Copyright (c) Microsoft Corporation. All rights reserved.
Error stream:
21:41:55.078 |I| NUnitDotNetVsTestRunStrategy | :99 | Process dotnet:9196 has exited with code (0)
Output stream: Microsoft (R) Test Execution Command Line Tool Version 15.7.0
Copyright (c) Microsoft Corporation. All rights reserved.
Error stream:
21:41:55.079 |I| UnitTestLaunch | :15 | dotnet exited
21:41:55.079 |I| NUnitDotNetVsTestRunStrategy | :15 | dotnet exited
21:41:55.081 |W| UnitTestLaunch | :42 | System.InvalidOperationException: Test-cases are missing for the selected tests. Rebuild the project and try again.
at JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestExecution.SendGetProcessStartInfo()
at Appccelerate.StateMachine.Machine.ActionHolders.ArgumentLessActionHolder.Execute(Object argument)
at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryAction(IActionHolder actionHolder, ITransitionContext`2 context)
21:41:55.082 |I| UnitTestLaunch | :42 | Run: eff40a72-ad0d-40e2-8acf-2436254cf2d1 - Faulted
21:41:55.082 |I| UnitTestLaunch | :42 | RunTestsStage completed
21:41:55.082 |I| UnitTestLaunch | :42 | FinishLaunchStage started
21:41:55.085 |I| UnitTestLaunch | :42 | Finishing run
21:41:55.090 |W| UnitTestLaunch | :42 | Element MyTests.CanViewAll was left pending after its run completion.
21:41:55.137 |W| UnitTestLaunch | :42 | Element MyTests.CanViewAll.MoviesThatOverlap was left pending after its run completion.
21:41:55.137 |W| UnitTestLaunch | :42 | Element MyTests.CanViewAll.MoviesThatOverlapNotInTimeOrder was left pending after its run completion.
21:41:55.137 |W| UnitTestLaunch | :42 | Element MyTests.CanViewAll.ListWithSingleMovieReturnsTrue was left pending after its run completion.
21:41:55.137 |W| UnitTestLaunch | :42 | Element MyTests.CanViewAll.EmptyMovieListReturnsTrue was left pending after its run completion.
21:41:55.151 |I| UnitTestLaunch | :42 | Run is finished
21:41:55.151 |I| UnitTestLaunch | :42 | FinishLaunchStage completed
21:41:55.828 |W| VsTextControlClickNavigationSinceVs10| :1 | GoToDefMouseHandler is not found among TextView properties.
21:41:55.965 |I| PsiChangesListener | :1 | Ranges building started
21:41:55.966 |I| PsiChangesListener | :1 | Ranges building completed
Hey guys,
Same issue here. I'm using C++ ReSharper with Google Tests and when I click on one of the tests or all of them, it won't run them with this error.
This happens in Debug and Release mode while trying to test a library project.
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 Smhoff256!
Could you please check the latest ReSharper 2018.2.2 - https://www.jetbrains.com/resharper/download/ and check if the problem is still reproduced?
Thank you.