Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
58dec2c
Retarget the MTP client onto Microsoft.Testing.Platform.ServerClient.…
nohwnd Jul 21, 2026
28045c9
Commit the interim local MTP client feed so restore works everywhere
nohwnd Jul 21, 2026
5e4ed91
Order remote NuGet feeds before the interim local feed in test asset …
nohwnd Jul 21, 2026
5ceda85
Key MTP environment variable dictionary case-insensitively on Windows
nohwnd Jul 21, 2026
98f135c
Consume official B-fixed MTP client source drop (testfx#10085)
nohwnd Jul 21, 2026
ae7a41b
Align interim MTP client pin to the coordinator's canonical numberfix…
nohwnd Jul 21, 2026
cf426fb
Add MTP converter/options unit tests and fix numeric and trait coercion
azat-msft Jul 28, 2026
49f28da
Fix MTP client shutdown and fail loudly on a missing node uid
azat-msft Jul 28, 2026
0c7c5da
Add non-ASCII MTP acceptance coverage for UTF-8 frame length
azat-msft Jul 28, 2026
228a8ce
Narrow the non-ASCII MTP test name to the BMP and fix the collector c…
azat-msft Jul 28, 2026
e9a4651
Consume the MTP client drop with the Content-Length framing fix
azat-msft Jul 28, 2026
1e59757
Repin the interim MTP client to the uniquely-named utf8fix1 drop
azat-msft Jul 28, 2026
f300223
Address expert review feedback on the MTP hardening
azat-msft Jul 30, 2026
0e64a44
Consume the latest MTP client drop from testfx#10297
azat-msft Jul 30, 2026
93dfe63
Merge pull request #12 from azat-msft/azat-msft-mtp-client-hardening
nohwnd Jul 30, 2026
eafeb11
Merge remote-tracking branch 'origin/main' into nohwnd-mtp-source-cli…
nohwnd Aug 10, 2026
d356a33
Consume the published MTP client package; drop the interim local feed
nohwnd Aug 10, 2026
d5d2fed
Enable the MTP testhost in the non-ASCII acceptance test
nohwnd Aug 10, 2026
c3b8910
Reject fractional MTP line numbers
nohwnd Aug 13, 2026
3b8376c
Reject selected MTP nodes without UIDs
nohwnd Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ ehthumbs.db

*.dmp
*.nupkg
# Exception: the interim committed local feed for the unshipped source-only MTP client package
# (Microsoft.Testing.Platform.ServerClient.Source). Remove once microsoft/testfx#10085 ships.
!eng/local-mtp-feed/*.nupkg
*.zip
/src/package/sign/sign.nuget.targets

Expand Down
4 changes: 4 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
</packageRestore>
<packageSources>
<clear />
<!-- INTERIM committed local feed for the unshipped source-only MTP client package
(Microsoft.Testing.Platform.ServerClient.Source). Repo-relative so it resolves on every
machine and in CI. Remove once the package ships to a public feed via microsoft/testfx#10085. -->
<add key="local-mtp" value="eng/local-mtp-feed" />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
Comment on lines 7 to 8
<!-- Begin: Package sources from vs-code-coverage -->
<!-- End: Package sources from vs-code-coverage -->
Expand Down
2 changes: 2 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
<!-- Name of the elements must be in sync with test\Microsoft.TestPlatform.TestUtilities\IntegrationTestBase.cs -->
<AwesomeAssertionsVersion>8.1.0</AwesomeAssertionsVersion>
<MicrosoftTestingPlatformVersion>2.1.0</MicrosoftTestingPlatformVersion>
<!-- INTERIM: unshipped source-only MTP server-mode client from microsoft/testfx#10085, served from the committed eng/local-mtp-feed. Pinned to the coordinator's canonical uniquely-named drop to avoid NuGet same-version cache collisions on shared machines. Remove the feed and repin to the published version once #10085 ships to a real feed. -->
<MicrosoftTestingPlatformServerClientSourceVersion>2.4.0-dev.numberfix</MicrosoftTestingPlatformServerClientSourceVersion>
<MoqVersion>4.16.1</MoqVersion>
<!-- For coverage use our own package on latest stable -->
<MicrosoftCodeCoverageVersion>18.3.0</MicrosoftCodeCoverageVersion>
Expand Down
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;

using Microsoft.Testing.Platform.ServerMode.Client;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;

namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.MTP;

/// <summary>
/// vstest-side glue for the source-only Microsoft.Testing.Platform (MTP) server client: builds the
/// <see cref="MtpServerClientOptions"/> that identify vstest to the MTP application, bridge the client's
/// own diagnostics to <see cref="EqtTrace"/>, and map the server's <c>client/log</c> levels onto vstest's
/// <see cref="TestMessageLevel"/>.
/// </summary>
internal static class MtpClientOptionsFactory
{
/// <summary>
/// Builds the options used to launch an MTP application: vstest's client identity, a single
/// discover-or-run session (not stateful), the vstest connection timeout, the EqtTrace diagnostics
/// bridge, and any environment variables to inject into the launched process.
/// </summary>
public static MtpServerClientOptions CreateOptions(IDictionary<string, string?>? environmentVariables = null)
{
var options = new MtpServerClientOptions
{
ClientName = "vstest",
ClientVersion = "1.0.0",
DebuggerProvider = false,
IsStateful = false,
ConnectionTimeout = GetConnectionTimeout(),
Logger = new DelegateMtpClientLogger(Trace),
};

if (environmentVariables is not null)
{
foreach (KeyValuePair<string, string?> variable in environmentVariables)
{
options.EnvironmentVariables[variable.Key] = variable.Value;
}
}

return options;
}

/// <summary>
/// Maps a server <c>client/log</c> level string onto the vstest <see cref="TestMessageLevel"/>.
/// </summary>
public static TestMessageLevel MapServerLogLevel(string level)
=> level switch
{
"Error" or "Critical" => TestMessageLevel.Error,
"Warning" => TestMessageLevel.Warning,
_ => TestMessageLevel.Informational,
};

private static TimeSpan GetConnectionTimeout()
{
// Reuse vstest's connection timeout knob so users can extend it in slow environments.
string? value = Environment.GetEnvironmentVariable("VSTEST_CONNECTION_TIMEOUT");
return !string.IsNullOrEmpty(value) && int.TryParse(value, out int seconds) && seconds > 0
? TimeSpan.FromSeconds(seconds)
: TimeSpan.FromSeconds(90);
}

private static void Trace(MtpClientLogLevel level, string message)
{
switch (level)
{
case MtpClientLogLevel.Error:
EqtTrace.Error(message);
break;

case MtpClientLogLevel.Warning:
EqtTrace.Warning(message);
break;

case MtpClientLogLevel.Information:
EqtTrace.Info(message);
break;

default:
EqtTrace.Verbose(message);
break;
}
}
}

This file was deleted.

57 changes: 0 additions & 57 deletions src/Microsoft.TestPlatform.CrossPlatEngine/Client/MTP/MtpJson.cs

This file was deleted.

Loading
Loading