-
Notifications
You must be signed in to change notification settings - Fork 262
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
WSL2 remote testing and MSTest seems broken on Visual Studio? #4445
Comments
Hi @markm77, Were you already using MSTest runner (or MSTest SDK) the last time it was working? @drognanar could you please investigate? |
Hi @Evangelink , Thanks for the reply. Yes I was using a project with MSTest SDK when it previously worked (v3.6.3 although that also fails now). I also believe I was using Visual Studio v17.12.2 (which fails now too) but I can't be absolutely certain on that. I spent quite a bit of time trying to revert back to a successful state but this is hard as I don't know exactly how the remote testing works (does it rely on dependencies on the Linux side or Windows system components which may have changed?) and ultimately I was not successful. BR, |
Thanks @markm77, I assume this is a Test Explorer issue so I'll try to have someone from that team looking at the issue after the holidays. |
Hi @Evangelink , Thanks for this! In the meantime, I've started running MSTest tests manually in WSL2 with So I do look forward to getting to the bottom of this. BR, |
Hi @Evangelink , Based on your comment, I thought I'd try to disable Microsoft Testing Platform and force Visual Studio to use VSTest to run the tests by adding the following to the .csproj file: <ItemGroup>
<ProjectCapability Remove="TestingPlatformServer"/>
</ItemGroup> I assumed this would work as I can run the MSTest tests in Rider which I assume uses VSTest (note Rider does not have a "same-source" WSL2 remote testing feature like Visual Studio). But this setting does not appear to have any effect (perhaps the MSTest SDK overrides it?). BR, |
Hi there,
Something seems to have gone wrong with Visual Studio/MS Test tooling which means that remote tests on WSL2 that used to work now don't. I don't believe it's my code as I have tried tests that previously worked with earlier versions of Visual Studio a couple of months ago or less. I hoped rolling back Visual Studio (which I believe is linked to a .NET SDK version) would fix the issue but it doesn't (and it doesn't seem easy to roll back further than the previous version). So I'm reporting the issue here in the hope of getting guidance in isolating it further.
I've created a minimal repro (see below) to demo the issue so perhaps that can help in working out where to go from here.
I appreciate any help as this has completely broken my test system.
BR,
Mark
Steps To Reproduce
Create a simple test project in latest version of Visual Studio (17.12.3) as follows.
Project file:
testEnvironments.json
file (configures remote testing):Test method file:
Expected behaviour
There are three trivial tests and they should pass in both Windows and WSL2 (remote testing) environments.
Actual behaviour
Tests pass fine in Windows envrionment.
Tests will not run in WSL2 environment and errors like the following turn up in the output from Tests:
If I try to debug the WSL2 tests in Visual Studio, the tests do not complete and the "Cancel" button becomes unresponsive.
The text was updated successfully, but these errors were encountered: