Running tests in Test Explorer are not updating
When I run SpecFlow tests via Test Explorer in Visual Studio 2022 the test status is not updated after running.
I am using Visual Studio 2022 (64-bit) Version 17.4.3
And Specflow version 3.9.74
This is the error from the Output window.
========== Starting test run ==========
System.InvalidOperationException: TestsForOrigin: Unknown TestCaseRecord.Origin value Unknown
at Microsoft.VisualStudio.TestStorage.MergedTestGroup.TestsForOrigin(TestCaseOrigin origin)
at Microsoft.VisualStudio.TestStorage.MergedTestGroup.MarkAsStale()
at Microsoft.VisualStudio.TestStorage.MergedTestIndex.MarkAsStale(TestCaseOriginKind originKind)
at Microsoft.VisualStudio.TestStorage.TestStoreIndexSet.MarkTestsAsStale(TestCaseOriginKind originKind)
at Microsoft.VisualStudio.TestStorage.TestStore.MarkTestsAsStale(TestCaseOriginKind originKind)
at Microsoft.VisualStudio.TestWindow.Host.TestRunSession.StartTestRun(IEnumerable`1 containers, IEnumerable`1 requestedTestCasesToRun, Boolean isHotReloadRun)
at Microsoft.VisualStudio.TestWindow.Host.VsTestRunSession.StartTestRun(IEnumerable`1 containers, IEnumerable`1 requestedTestCasesToRun, Boolean isHotReloadedRun, Int32 totalIterations)
at Microsoft.VisualStudio.TestWindow.Host.VsTestRunSession.StartTestRun(ICollection`1 requests, Int32 totalIterations)
at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.CallInternalWithLogging(IInternalLogger log, Action action, Boolean shouldThrow)
System.Collections.Generic.KeyNotFoundException: The given key 'C:\Workspaces\oasis\oasis-testing\Ixi.VisualFramework.Selenium.Test\bin\Debug\net6.0\Ixi.VisualFramework.Selenium.Test.dll' was not present in the dictionary.
at System.Collections.Immutable.ImmutableDictionary`2.get_Item(TKey key)
at Microsoft.VisualStudio.TestWindow.Host.VsTestRunSession.ToTestResultRecord(TestResultRecord testResult, IImmutableDictionary`2 containerLookup, TestStore store, Int32 testRunIndex, Boolean isHotReloadedRun, Int32 currentIteration)
at Microsoft.VisualStudio.TestWindow.Host.VsTestRunSession.ToLocalTestResultRecord(TestResultRecord testResult)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at Microsoft.VisualStudio.TestWindow.Host.TestRunSession.AddTestResultRecords(IEnumerable`1 testResultRecords)
at Microsoft.VisualStudio.TestWindow.Host.VsTestRunSession.AddRemoteTestResultRecords(IEnumerable`1 testResults)
at Microsoft.VisualStudio.TestWindow.Host.VsTestRunSession.OnTestRunUpdate(IEnumerable`1 testResults, IEnumerable`1 activeTests)
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProvider.TestResponseHandler.<>c__DisplayClass16_0.<HandleTestRunStatsChangeAsync>b__0()
at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.CallInternalWithLogging(IInternalLogger log, Action action, Boolean shouldThrow)
System.InvalidOperationException: TestsForOrigin: Unknown TestCaseRecord.Origin value Unknown
at Microsoft.VisualStudio.TestStorage.MergedTestGroup.TestsForOrigin(TestCaseOrigin origin)
at Microsoft.VisualStudio.TestStorage.MergedTestGroup.MarkAsNotRunningAndNotPending()
at Microsoft.VisualStudio.TestStorage.MergedTestIndex.MarkAsNotRunningAndNotPending(TestCaseOriginKind originKind)
at Microsoft.VisualStudio.TestStorage.TestStoreIndexSet.MarkTestsAsNotRunningAndNotPending(TestCaseOriginKind originKind)
at Microsoft.VisualStudio.TestStorage.TestStore.MarkTestsAsNotRunningAndNotPending(TestCaseOriginKind originKind)
at Microsoft.VisualStudio.TestWindow.Host.VsTestRunSession.EndTestRun()
at Microsoft.VisualStudio.TestWindow.Host.VsTestRunSession.OnTestRunCompleted()
at Microsoft.VisualStudio.TestWindow.Utilities.EventPumpExtensions.<>c__DisplayClass0_0.<EnqueueAsync>b__0()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProvider.<RunTestsAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProvider.<RunTestsAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.<CallWithCatchAsync>d__11`1.MoveNext()
NB I run exactly the same from Visual Studio 2019 and it works fine.
Please sign in to leave a comment.
Comments
0 comments