Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove xunit.console and make VSTest the default runner both locally and in CI #37953

Open
ViktorHofer opened this issue Jun 16, 2020 · 7 comments
Labels
area-Infrastructure-libraries blocked Issue/PR is blocked on something - see comments dev-innerloop
Milestone

Comments

@ViktorHofer
Copy link
Member

ViktorHofer commented Jun 16, 2020

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.

  1. Remove xunit.console:
  1. Remove runner templates for non-mobile and non-wasm:
  1. Revert 85bfbfc#diff-e7bc39410f7a119e7adb69b17006c452

  2. Condition the RunTemplate and Test target logic on TargetsMobile and WASM:

  1. Use dotnet test in CI instead of RunTests.cmd/sh for non-mobile and non-wasm:
  • <HelixCommand Condition="'$(TargetOS)' == 'Windows_NT'">call RunTests.cmd --runtime-path %HELIX_CORRELATION_PAYLOAD%</HelixCommand>
    <HelixCommand Condition="'$(TargetOS)' != 'Windows_NT'">./RunTests.sh --runtime-path "$HELIX_CORRELATION_PAYLOAD"</HelixCommand>
  1. Fix failing tests (ie Microsoft.Extensions.DependencyModel.Tests) and make sure that code coverage works.

  2. Optional: use dotnet publish instead of the ArchiveTests target:

cc @Anipik @ericstj @safern

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Infrastructure-libraries untriaged New issue has not been triaged by the area owner labels Jun 16, 2020
@ghost
Copy link

ghost commented Jun 16, 2020

Tagging subscribers to this area: @safern, @ViktorHofer
Notify danmosemsft if you want to be subscribed.

@ViktorHofer ViktorHofer removed the untriaged New issue has not been triaged by the area owner label Jul 8, 2020
@ViktorHofer ViktorHofer added this to the 5.0.0 milestone Jul 8, 2020
@ViktorHofer ViktorHofer self-assigned this Jul 30, 2020
@ViktorHofer
Copy link
Member Author

Blocked until 5.0 P8 SDK is released.

@tmds
Copy link
Member

tmds commented Sep 23, 2020

I'm interested in this because it will make long running tests produce a coredump.
On our rhel8 arm64 CI machine, occasionally we see some long running tests, and having these coredumps will help debug them.

@tmds
Copy link
Member

tmds commented Oct 12, 2020

@ViktorHofer is this something you'll be working on short term? I've been ignoring failures from long running tests on our arm64 rhel8 ci machine because having coredumps from vstest will make it easier to debug them.

@ViktorHofer
Copy link
Member Author

@tmds #39923 is finally ready. It should be merged as soon as I discussed the new device bring-up scenario offline with my colleagues.

@ViktorHofer ViktorHofer modified the milestones: 6.0.0, 7.0.0 Aug 4, 2021
@PRIMETSS
Copy link
Contributor

PRIMETSS commented Nov 23, 2021

Spent the last few days trying to get v6 & v5 building locally to look at SerialPort Libs and kept having issue where build seemed to break with open files errors. Traced it to xunit.console.exe is not terminating if run dotnet build /t:test
Seems related to https://github.com/xunit/xunit/issues/1811 Cant even KILL the process, have to reboot!
Begs the question, how does one Test Libs LOCALLY?? Is everyone using the CI only? (guess it runs in Container and gets wiped out each build cycle so runs clean?) Will try JUST using VS to run tests, as this might work if you dont mix running tests in CLI.
Just baffled how this isn't a more common question? (me?)

@ViktorHofer ViktorHofer removed their assignment Jul 20, 2022
@ViktorHofer ViktorHofer added the blocked Issue/PR is blocked on something - see comments label Jul 20, 2022
@ViktorHofer
Copy link
Member Author

Blocked by microsoft/vstest#3595

@ViktorHofer ViktorHofer modified the milestones: 7.0.0, Future Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure-libraries blocked Issue/PR is blocked on something - see comments dev-innerloop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants