Unit Tests not running with DotCover, VS 2017 and MSTest 2.0

Completed

When I try to cover unit tests with DotCover in a VS 2017 project using MSTest 2.0, all the tests are inconclusive with "Test not run". In the log (within the test sessions window), it says "Coverage analysis: Instrumentation was requested, but wasn't made", followed by "Element {test name} was left pending after its run completion" for every unit test. Running them without coverage works fine.

A VS 2015 project using MSTest 2.0 has no issues, and a VS 2017 project using MSTest 1.0 has no issues.

I've tried collecting logs, but I don't know what I'm looking for; there appear to be logs for "Build", "Install" and "JetBrains", but I can't see anything in them that appears testing related.

8 comments
Avatar
Ekaterina Solovova
Comment actions Permalink

Hello Shawn,

Which dotCover version are you using? If it's 2016.3 or older than this is a known issue. We have added support for MSTest v2 to dotCover 2017.1. You are welcome to try the latest EAP: https://www.jetbrains.com/resharper/eap/

Best regards.

0
Comment actions Permalink

I was using 2016.3.2. I updated to the EAP version and it seems to be working fine. Thanks!

0
Comment actions Permalink

I am having a similar issue, all my tests are showing as "Inconclusive: Test not run" in Continuous Testing Sessions but the same tests run just fine under Unit Test Sessions.  There is 1 error listed that reads "Coverage analysis: Can't start analysis. Operation was canceled by user.  Failed to verify x64 COM object registration: Empty path to COM object."

I am using dotCover 2017.2 (downloaded and installed less that 3 weeks ago).

0
Comment actions Permalink

Hello Scott,

There could be several reasons for this error:
- Unfinished Windows updates. Could you please try to reboot your machine, install all updates for Windows and check if the issue persists?
- One more possible reason is a limited user account. The error message means that HKEY_CURRENT_USER\SOFTWARE\Classes was not mapped to HKEY_CLASSES_ROOT. It is the part of OS protection which is active for some accounts in OS. Do you indeed use some limited account?

0
Comment actions Permalink

Fedor,

I do run under a limited access account, unfortunately it's not something I can change. The error that I saw, the one in my original post, seems to have gone away but I have seen the behavior twice since posting...the log always read "OK" for those so it's hard to know what caused it.  However, the project(s) in question has several web.config transforms and I was able to get things going again after cleaning and rebuilding the solution under a different config.  I think one of those may have been the culprit but I have not been able to reproduce the issue again since so I'm not sure which web.config caused the issue or why.

0
Comment actions Permalink

Hello Scott

Thanks a lot for the details! Glad to hear that it works fine now.

0
Comment actions Permalink

have the same problem here.  Not a limited account.  What can I provide to you to help out?

1
Comment actions Permalink

I have exactly the same issue. 

When I run or debug unit tests it works fine.

But When I run dotCover all tests just go to unconclusive. 

I run Visual Studio as full administrator.

My resharper version is 2018.1.2

My Visual Studio is VS 2013 Ultimate Update 5 version 12.0.40629.00

 

Logged errors:

2018.07.09 09:52:38.252 ERROR Transition failed: Transition from state <Disconnected> on event <local::Connect>. One or more errors occurred. A task was canceled.

--- EXCEPTION #1/3 [TaskCanceledException]
Message = “A task was canceled.”
ExceptionPath.1 = Root.InnerException.InnerException
ExceptionPath.2 = Root.InnerException.InnerExceptions.#0
ClassName = System.Threading.Tasks.TaskCanceledException
HResult = COR_E_OPERATIONCANCELED=8013153B

--- Outer ---

--- EXCEPTION #2/3 [AggregateException]
Message = “One or more errors occurred.”
ExceptionPath = Root.InnerException
ClassName = System.AggregateException
InnerException = “Exception #1 at Root.InnerException.InnerException”
HResult = COR_E_EXCEPTION=80131500
Source = mscorlib
InnerExceptions.#0 = “Exception #1 at Root.InnerException.InnerException”
StackTraceString = “
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at JetBrains.Common.UnitTesting.HostController.ProfilerTaskRunnerHostController.StartProcess(ProcessStartInfo startInfo, IUnitTestRun run, ILogger logger)
at JetBrains.ReSharper.UnitTestFramework.Launch.UnitTestLaunch.HostControllerWithLogging.StartProcess(ProcessStartInfo startInfo, IUnitTestRun run, ILogger logger)
at JetBrains.ReSharper.UnitTesting.MSTest.Provider.Execution.MsTestRunStrategyBase.RunProcess.Run(ProcessStartInfo startInfo, ILogger logger)
at JetBrains.ReSharper.UnitTesting.MSTest.Provider.Execution.MsTestExecutionProtocol.VsTestExecutionEngineInvoker.Start(VsTestRuntimeEnvironment env, ILogger logger, IDictionary`2 environmentVariables)
at JetBrains.ReSharper.UnitTesting.MSTest.Provider.Execution.MsTestExecutionProtocol.StartRunner()
at Appccelerate.StateMachine.Machine.ActionHolders.ArgumentLessActionHolder.Execute(Object argument)
at Appccelerate.StateMachine.Machine.States.State`2.ExecuteEntryAction(IActionHolder actionHolder, ITransitionContext`2 context)

--- Outer ---

--- EXCEPTION #3/3 [LoggerException]
Message = “Transition failed: Transition from state <Disconnected> on event <local::Connect>. One or more errors occurred.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #2 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.UnitTesting.MSTest.Provider.Execution.MsTestExecutionProtocol.<.ctor>b__24_17(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)

2018.07.09 09:52:38.254 ERROR System.Threading.Tasks.TaskCanceledException: A task was canceled.
2018.07.09 09:52:38.259 ERROR System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at JetBrains.Profiler.Windows.RemoteApi.Impl.Version0000.RemoteProfile0000.ProcessAsyncResult(IAsyncResult asyncResult)
2018.07.09 09:52:38.260 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests was left pending after its run completion.
2018.07.09 09:52:38.260 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterCanBeCreated was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterCanBeInitialized was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.InitializingPresenterSetsHasSaveMosaicContentAuthorization was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.InitializingPresenterSetsHasRevokeStreamReservationAuthorization was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterRespondsToFindArchiveEventUsingFocalItem was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterRespondsToShowConnections was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterShowsMessageBoxBeforeClosingModifiedLayout was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterRespondsToCloseAllMosaicEvent was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterLoadPreviousContentsIfFound was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterLoadKnownMosaicContentsWhenStarting was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterLoadKnownMosaicContentsWhenStartingSalvoCase was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterLoadKnownMosaicContentsWhenStartingContentExists was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterLoadKnownMosaicContentsWhenStartingContentExistsButNewContentIsDirty was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterDoNotLoadPreviousContentsWhenAutomationIsEnabled was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterShowCameraInMosaicRequested was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterSaveMosaicContentRequested was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterSaveMosaicContentRequestedWithChanges was left pending after its run completion.
2018.07.09 09:52:38.261 WARN Element Alstom.Ism.Vsm.Hmi.UnitTests.VsmCommandWindow.VsmCommandWindowPresenterTests.VsmCommandWindowPresenterSaveChangesRequested was left pending after its run completion.

 

 

 

 

 

 

 

0

Please sign in to leave a comment.