Skip to content

[MTP Integration Analysis] VSTestBridge leaves IRunSettings.GetSettings unimplemented #8436

@Evangelink

Description

@Evangelink

Summary

Microsoft.Testing.Extensions.VSTestBridge still throws NotImplementedException from IRunSettings.GetSettings. Any bridged adapter that relies on that VSTest API will work under VSTest but fail under the MTP bridge.

Evidence

  • src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/RunSettingsAdapter.cs:40-47
    • the adapter builds a patched runsettings document and stores it in SettingsXml.
  • src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/RunSettingsAdapter.cs:54-55
    • // TODO: Needs to be implemented if used by adapters. It is not used by MSTest.
    • public ISettingsProvider? GetSettings(string? settingsName) => throw new NotImplementedException();
  • src/Platform/Microsoft.Testing.Extensions.VSTestBridge/PACKAGE.md:17-22
    • the package advertises Runsettings and filter support for framework authors.

Why this is a real issue

The bridge is explicitly meant for test framework / adapter authors, not just MSTest. Those adapters can legitimately call IRunSettings.GetSettings(...) to read custom runsettings sections. Today the bridge advertises runsettings compatibility, constructs SettingsXml, and then still throws for the rest of the contract, which turns a supported VSTest adapter API into a runtime failure under MTP.

Suggested resolution

Implement GetSettings over the patched runsettings XML (or document and expose a supported alternative if the VSTest contract cannot be mirrored exactly). Add a unit test covering a bridged adapter that requests a named settings provider.

Related issues

  • None found

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions