Skip to content

Please document the IPC handshake mechanisms and open up the classes under Microsoft.Testing.Platform.IPC  #2539

Open
@bradwilson

Description

@bradwilson

The protocol documentation is a good start, but it leaves a lot of unanswered questions about how runners are intended to actually communicate with tests. Right now that information appears to be locked up inside of Microsoft.Testing.Extensions.VSTestBridge (for which I've been unable to find the official source). Reverse engineering the dotnet test interactions seems to indicate that it uses a command line switch (--internal-msbuild-node) that's expected to let the test know that it should open a named pipe for communication. I have not yet tried to determine how Test Explorer (in VS or in VS Code) works (or doesn't yet work) here.

This leaves me with two problems.

Understanding the expectations on unit test projects

I do not intend to use the VSTest bridge in xUnit.net v3, so I'm left trying to decode the interactions and support them myself. What are the command line switches that I'm expected to recognize and handle? How can I directly create and use an instance of NamedPipeClient? I'm currently hacking in using TestApplication but I'd like to understand how I can do what that does myself, as the API there isn't necessarily a good fit for me.

Understanding the expectations on unit test runners

In the process of supporting meta-runners like xunit.v3.console, which can run multiple test assemblies, I would like to become the server side of the IPC protocol. Given that there is no abstraction equivalent to TestApplication, how can I directly create and use an instance of NamedPipeServer to be the test host?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions