FortuneN / FineCodeCoverage

Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
https://marketplace.visualstudio.com/items?itemName=FortuneNgwenya.FineCodeCoverage
Other
516 stars 39 forks source link

FCC not working on Visual Studio version 17.9.0 Preview 2.0 #364

Closed EnisBiberovic closed 7 months ago

EnisBiberovic commented 8 months ago

Installed product versions

Description

FCC fails on processing unit tests events

Steps to recreate

  1. Run tests
  2. inspect the Output FCC

Current behavior

Fine Code Coverage 19. 12. 2023. 20:11:50: Initializing Fine Code Coverage 19. 12. 2023. 20:11:52: Initialized Fine Code Coverage 19. 12. 2023. 20:14:15: Error processing unit test events System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ReflectObject.PropertyDoesNotExistException: Property IsAborted with binding flags Instance, Public, NonPublic does not exist on Microsoft.VisualStudio.TestWindow.Messages.TestRunResponse at ReflectObject.PropertySetterBase1.EnsureMemberExists() at ReflectObject.PropertySetterBase1.Set(ReflectObjectProperties wrapper, Object reflectedObject) at System.Collections.Generic.List1.ForEach(Action1 action) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at ReflectObject.PropertySetter.GetPropertyValue(ReflectObjectProperties wrapper, Object reflectedObject) at ReflectObject.PropertySetterBase1.Set(ReflectObjectProperties wrapper, Object reflectedObject) at System.Collections.Generic.List1.ForEach(Action1 action) at FineCodeCoverage.Impl.TestOperationFactory.Create(IOperation operation) at FineCodeCoverage.Impl.TestContainerDiscoverer.<TestExecutionStartingAsync>d__23.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 FineCodeCoverage.Impl.TestContainerDiscoverer.<OperationState_StateChangedAsync>d__36.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 FineCodeCoverage.Impl.TestContainerDiscoverer.<TryAndLogExceptionAsync>d__37.MoveNext() Fine Code Coverage 19. 12. 2023. 20:15:37: Error processing unit test events System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ReflectObject.PropertyDoesNotExistException: Property IsAborted with binding flags Instance, Public, NonPublic does not exist on Microsoft.VisualStudio.TestWindow.Messages.TestRunResponse at ReflectObject.PropertySetterBase1.EnsureMemberExists() at ReflectObject.PropertySetterBase1.Set(ReflectObjectProperties wrapper, Object reflectedObject) at System.Collections.Generic.List1.ForEach(Action1 action) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at ReflectObject.PropertySetter.GetPropertyValue(ReflectObjectProperties wrapper, Object reflectedObject) at ReflectObject.PropertySetterBase1.Set(ReflectObjectProperties wrapper, Object reflectedObject) at System.Collections.Generic.List1.ForEach(Action1 action) at FineCodeCoverage.Impl.TestOperationFactory.Create(IOperation operation) at FineCodeCoverage.Impl.TestContainerDiscoverer.ShouldConditionallyCollectWhenTestExecutionFinished(IOperation operation) at FineCodeCoverage.Impl.TestContainerDiscoverer.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 FineCodeCoverage.Impl.TestContainerDiscoverer.d36.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 FineCodeCoverage.Impl.TestContainerDiscoverer.d37.MoveNext()

Expected behavior

Expect that coverage data is collected and analyzed.

tonyhallett commented 8 months ago

FCC reflects on test explorer objects. If they change object structure or visibility this will occur. Please use easier visual studio version. When 17.9 is released I will delve around.

tonyhallett commented 7 months ago

Fixed - updated in marketplace