Skip to content

Add a cross-process TRX/TCM + data-collector property parity regression test for the MSTest execution pipeline #9587

Description

@Evangelink

Summary

The initiative to make MSTestAdapter.PlatformServices platform-agnostic (removing its Microsoft.TestPlatform.ObjectModel dependency) has as its #1 invariant that cross-process discover→execute fidelity is preserved byte-for-byte — specifically the TRX / TCM (Test Case Management) properties and data-collector-injected custom properties that the host attaches to test cases and results in cross-process (VSTest host) scenarios.

Today there is no dedicated cross-process regression test that asserts this parity. The fidelity of the phases that touched result recording rests on:

  • identical-handle-resolution reasoning (normal results record against the original host TestCase via the memoized UnitTestElement.GetOrCreateHostTestCase() handle; cleanup-failure results use AssociatedUnitTestElement), and
  • the in-process MSTest.IntegrationTests suite (which drives discover→run through the engine but does not exercise the cross-process host that injects TCM / data-collector properties).

This is acceptable per-PR, but the gap should be explicit and tracked rather than implicit.

Proposed work

Add an acceptance/integration test that:

  1. Runs the MSTest execution pipeline cross-process (via the VSTest host / vstest.console) against a small test asset.
  2. Injects host-side TCM properties (ExecutionId/ParentExecId/TestCaseHierarchy/TCM Id/SuiteId/ConfigurationId, etc.) and, where feasible, a data collector that attaches custom result properties/attachments.
  3. Asserts the produced TRX (and result properties) are byte-for-byte identical to a captured baseline — i.e. that the neutralized engine does not drop or alter host-injected properties on normal results.

Notes

Category

Task (test gap / regression-coverage follow-up).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions