Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
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>
<!-- Source-only MTP server-mode client (compiled into CrossPlatEngine), shipped by microsoft/testfx#10085. Restored from the dotnet-tools feed already configured in NuGet.config. -->
<MicrosoftTestingPlatformServerModeClientSourcesVersion>2.4.0-preview.26410.1</MicrosoftTestingPlatformServerModeClientSourcesVersion>
<MoqVersion>4.16.1</MoqVersion>
<!-- For coverage use our own package on latest stable -->
<MicrosoftCodeCoverageVersion>18.3.0</MicrosoftCodeCoverageVersion>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// 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.CoreUtilities.Helpers;
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 shared connection-timeout knob (VSTEST_CONNECTION_TIMEOUT) rather than
// re-reading the environment variable here, so the MTP path honours exactly the same
// override, default and diagnostics as every other vstest connection.
=> TimeSpan.FromSeconds(EnvironmentHelper.GetConnectionTimeout());

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