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

[BUG] Unable to Connect to Testing Platform on Linux #1690

Open
ethangillengg opened this issue Dec 15, 2024 · 2 comments
Open

[BUG] Unable to Connect to Testing Platform on Linux #1690

ethangillengg opened this issue Dec 15, 2024 · 2 comments
Assignees
Labels
area-test Test discovery, execution, debugging bug Something isn't working

Comments

@ethangillengg
Copy link

ethangillengg commented Dec 15, 2024

Describe the Issue

I was trying out the new Microsoft.Testing.Platform, but was getting the following error in my the C# Dev Kit - Test Explorer output in VS Code:

Created Test Controller
Log verbosity: minimal
platform: linux arch: x64
Using vstest from dotnet sdk in [/nix/store/shf7sm84b755wi2igsg4px830rglx324-dotnet-sdk-9.0.101/share/dotnet/sdk/9.0.101].
Initialized Test Explorer Server [457050]
Test Store Folder: /home/ethan/.config/Code/User/workspaceStorage/ec00d5dd03443181ee1913bf602dd53c/ms-dotnettools.csdevkit
Test data store opened in 0.028 sec.
Initialized project system provider.
1 projects added, 0 changed, 0 removed.
Scheduling discovery: /home/ethan/Code/Lab/xUnitExperiment/bin/Debug/net9.0/xUnitExperiment.dll [1734252281828]
========== Starting test discovery ==========
Unable to connect to testing platform runner process '/home/ethan/Code/Lab/xUnitExperiment/bin/Debug/net9.0/xUnitExperiment.dll'.
========== Test discovery aborted: 0 Tests found in 65.4 ms ==========
0 tests discovered from  in 65.355 ms

I found this originally when trying to use TUnit, following the exact installation instructions and example outlined in TUnit's documentation, but this issue also persisted with xUnit following the xUnit documentation.

I am also running NixOS so this may be specific to my platform.

Steps To Reproduce

  1. Ensure all configuration for the extension is set to default, except:
  "dotnet.testWindow.useTestingPlatformProtocol": true
  1. Create a new xunit project with dotnet new xunit3
  2. Reload the VS Code window
  3. Look at Output for C# Dev Kit - Test Explorer
  4. See the error above
  5. Also note how no tests are discovered, and running all tests does not run anything

Expected Behavior

The extension should connect to the testing platform without fail, and be able to discover tests as well as run them.

Environment Information

  • OS: Linux - NixOS 25.05 (Warbler)
  • VS Code Version: 1.95.3
  • Extension Version: v1.15.13 (pre-release)
  • Dotnet SDK Version: 9.0.101 (also tested on dotnet 8)
@ethangillengg ethangillengg added the bug Something isn't working label Dec 15, 2024
@AbhitejJohn AbhitejJohn added the area-test Test discovery, execution, debugging label Dec 16, 2024
@ocallesp
Copy link
Member

@fhnaseer could someone from the Test Platform take a look ?

@hh10k
Copy link

hh10k commented Dec 31, 2024

I have the same issue in a dev container on macOS with host-mode networking enabled.

Test Explorer does not work, due to the way vstest communicates between client and server. I assume this is still a problem even with useTestingPlatformProtocol?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test Test discovery, execution, debugging bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants