Is ICommandLineOptions.IsOptionSet("server") still the right way to detect Test Explorer in .NET 10? #6483
-
I know that today (pre-10), Test Explorer ends up passing Given the new |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Yes, test explorer will remain using --server. There are 2 different protocols used to communicate. in dotnet test we use binary messages thought pipe, in test explorer we use the json rpc protocol. The spec for the pipe protocol should be coming soon. #6187 |
Beta Was this translation helpful? Give feedback.
-
Test Explorer uses Json RPC protocol as of today. I haven't checked what exactly you do when you detect you are running in server mode, but if you are looking specifically for Json RPC, then: testfx/src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs Lines 194 to 195 in 0d5aa69 |
Beta Was this translation helpful? Give feedback.
Test Explorer uses Json RPC protocol as of today.
The
dotnet test
coming in .NET 10 will use pipe protocol, but it will not be using the--internal-msbuild-node
. It will be using--server dotnettestcli
.I haven't checked what exactly you do when you detect you are running in server mode, but if you are looking specifically for Json RPC, then:
testfx/src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs
Lines 194 to 195 in 0d5aa69