Skip to content

DotnetTestHostManager runtimeconfig.dev.json and deps.json parsing not covered by integration tests #15589

@nohwnd

Description

@nohwnd

Problem

The \DotnetTestHostManager\ parses
untimeconfig.dev.json\ and *.deps.json\ to resolve additional probing paths and runtime libraries. However, these code paths are not exercised by integration/smoke tests.

Evidence: when we replaced \DependencyContextJsonReader\ with a custom \DepsJsonParser\ (and \JsonDocument.Parse\ with Jsonite for runtimeconfig.dev.json), no integration tests failed — proving these paths aren't covered.

Affected code

  • \src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs\ — \GetAdditionalProbingPaths\ and \GetDepsFileProbingPaths\
  • \src/Microsoft.TestPlatform.TestHostProvider/Hosting/DepsJsonParser.cs\ (new, replaces DependencyModel on .NET Framework)

Expected

Integration tests should verify that:


  1. untimeconfig.dev.json\ additional probing paths are correctly parsed and passed to testhost
  2. *.deps.json\ runtime libraries are correctly resolved for additional probing paths
  3. These paths actually affect testhost launch arguments

Context

Discovered during STJ migration work — the DependencyModel removal didn't cause any test failures, which means a regression in this parsing would go undetected.

cc @nohwnd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions