Description
Today we support two different test runners: xunit.console
and VSTest
. The former is used when invoking the test target dotnet msbuild /t:Test
and when running on CI. The latter is used when using VS Test Explorer, F5, the dotnet msbuild /t:Run
target or when invoking dotnet test
. To leverage the new crash dump / hang dump features that @davidfowl is driving in partnership with the VSTest team (cc @nohwnd), we should switch to VSTest and remove xunit.console entirely.
This issue only tracks the libraries side for non-mobile and non-WASM configurations. Mobile and WASM use a different harness called xharness which is out-of-scope at the moment.
- Remove xunit.console:
- https://github.com/dotnet/runtime/blob/master/eng/testing/xunit/xunit.console.targets
- https://github.com/dotnet/runtime/blob/master/eng/testing/xunit/xunit.targets#L17
- Remove runner templates for non-mobile and non-wasm:
- https://github.com/dotnet/runtime/blob/master/eng/testing/RunnerTemplate.cmd
- https://github.com/dotnet/runtime/blob/master/eng/testing/RunnerTemplate.sh
- 85bfbfc#diff-e7bc39410f7a119e7adb69b17006c452
- https://github.com/dotnet/runtime/blob/master/eng/testing/tests.targets#L22-L25
-
Condition the RunTemplate and Test target logic on TargetsMobile and WASM:
- https://github.com/dotnet/runtime/blob/master/eng/testing/tests.targets#L109-L112
- https://github.com/dotnet/runtime/blob/master/eng/testing/tests.targets#L40-L104
- Use
dotnet test
in CI instead of RunTests.cmd/sh for non-mobile and non-wasm:
runtime/src/libraries/sendtohelix.proj
Lines 69 to 70 in 132be64
-
Fix failing tests (ie Microsoft.Extensions.DependencyModel.Tests) and make sure that code coverage works.
-
Optional: use
dotnet publish
instead of theArchiveTests
target: