ZoomNet icon indicating copy to clipboard operation
ZoomNet copied to clipboard

Switch to the MSTest runner to run our unit tests

Open Jericho opened this issue 9 months ago • 3 comments

https://devblogs.microsoft.com/dotnet/introducing-ms-test-runner/

https://xunit.net/docs/getting-started/v3/microsoft-testing-platform

https://devblogs.microsoft.com/dotnet/mtp-adoption-frameworks/

Jericho avatar Mar 06 '25 01:03 Jericho

By default, dotnet test is using VSTest behavior to run tests. You can enable support for Microsoft.Testing.Platform in dotnet test by specifying the <TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport> setting in your project file.

With the release of xunit.v3, xUnit.net now supports running test through the new testing platform. To opt-in, simply edit your project’s project file to set <UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>.

Jericho avatar Mar 06 '25 01:03 Jericho

Coverlet currently does not support MSTest. See: https://github.com/coverlet-coverage/coverlet/issues/1715

I might have to switch to Microsoft code coverage https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-platform-extensions-code-coverage#microsoft-code-coverage

Jericho avatar Mar 06 '25 01:03 Jericho

I tried switching to dotnet coverage but was unsuccessful. Moving this feature to a branch, and removing it from 0.89.0

Will revisit when coverlet is updated.

Jericho avatar Mar 07 '25 14:03 Jericho

Figured it out.

Jericho avatar May 08 '25 00:05 Jericho