Closed WieknotJesduit closed 2 years ago
What version of the Microsoft.NET.Test.Sdk are you using ? Can you update to most recent and try again please.
16.0.1 I cannot upgrade the version easily since this solution is shared with 100s of other developers. I do know it works with other developers, so I am just "special" somehow. :-)
also the test project is net472
FCC uses reflection to obtain hidden test explorer information. It is either Microsoft.NET.Test.Sdk or Visual Studio itself that determines the accessibility of the members. What version of Visual Studio are you using ? Perhaps you can update that ?
VS 16.3.6 Looks like it doesn't have any new updates to install
opened vs installer, and now I see it needs to be updated
FCC is reflecting on TestRunRequest.
namespace Microsoft.VisualStudio.TestWindow.Controller
{
internal class TestRunRequest : Request
{
private
#nullable disable
Dictionary<Uri, List<Uri>> dataCollectorResults;
internal TestRunRequest(Operation operation, TestRunConfiguration testRunConfig)
: base(operation, (RequestConfiguration) testRunConfig)
{
}
public TestRunResponse Response { get; private set; } = TestRunResponse.Default;
It is public in VS2022 17.1.0
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Microsoft.VisualStudio.TestWindow.Core.dll
So should resolve itself when you have updated. ( It works with 2019 16.11.7)
I am in the middle of a substantial change to FCC. When I have completed it I will change the BindingFlags.
upgraded to 16.11.15 and now it is working. Thank you very much!
Installed product versions
Description
running test produces no coverage metrics see following error in FCC output Fine Code Coverage : Error test container discoverer reflection
Fine Code Coverage : Error processing unit test events System.Exception: Property Response with binding flags Instance, Public does not exist on Microsoft.VisualStudio.TestWindow.Controller.TestRunRequest at FineCodeCoverage.Impl.TestOperationFactory.Create(IOperation operation) in D:\a\FineCodeCoverage\FineCodeCoverage\SharedProject\Impl\TestContainerDiscovery\TestOperationFactory.cs:line 36 at FineCodeCoverage.Impl.TestContainerDiscoverer.ShouldConditionallyCollectWhenTestExecutionFinished(IOperation operation) in D:\a\FineCodeCoverage\FineCodeCoverage\SharedProject\Impl\TestContainerDiscovery\TestContainerDiscoverer.cs:line 149 at FineCodeCoverage.Impl.TestContainerDiscoverer.d__25.MoveNext() in D:\a\FineCodeCoverage\FineCodeCoverage\SharedProject\Impl\TestContainerDiscovery\TestContainerDiscoverer.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at FineCodeCoverage.Impl.TestContainerDiscoverer.d36.MoveNext() in D:\a\FineCodeCoverage\FineCodeCoverage\SharedProject\Impl\TestContainerDiscovery\TestContainerDiscoverer.cs:line 252
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at FineCodeCoverage.Impl.TestContainerDiscoverer.d 37.MoveNext() in D:\a\FineCodeCoverage\FineCodeCoverage\SharedProject\Impl\TestContainerDiscovery\TestContainerDiscoverer.cs:line 260
Steps to recreate
run any unit test/s
Current behavior
tests run as expected, but not coverage results are rendered
Expected behavior
after running test/s, I expect to see coverage data displayed