Skip to content

--publish-azdo-test-results publishes automatedTestName as the TestNode UID instead of the fully-qualified test name, orphaning Azure DevOps test history #10557

Closed

Description

Describe the bug

AzureDevOpsTestResultsPublisher sends testNode.Uid.Value as the Azure DevOps automatedTestName. For MSTest that UID is an opaque GUID, so every published result identifies its test by GUID instead of by fully-qualified name.

Three consequences:

  1. Test history is orphaned. Azure DevOps resolves a different testCaseReferenceId for what is the same test, so "Test history", "failing since" and its own flakiness analysis start from zero the moment a pipeline switches from PublishTestResults@2 to live publishing.
  2. The UI shows a GUID where the automated test name belongs.
  3. The extension's own flaky-history features stop matching. AzureDevOpsHistoryService keys its history dictionary by the automatedTestName it reads back from Azure DevOps, while AzureDevOpsReporter looks up with TestNodeIdentity.GetTestName(testNode) (the FQN). Once live publishing is the only writer of history, the two halves use different keys and --report-azdo-flaky-history / --report-azdo-demote-known-flaky can never match anything.

The extension already has the right helper, and its documentation says so explicitly — TestNodeIdentity.GetTestName:

TestMethodIdentifierProperty — the canonical, ECMA-335 compliant identity added by frameworks running natively on the platform. This is the property that maps to Azure DevOps' AutomatedTestName.

AzureDevOpsReporter and AzureDevOpsSlowTestReporter both use it. The publisher does not.

Version used

MSTest.Sdk 4.4.0-preview.26410.3 — Microsoft.Testing.Extensions.AzureDevOpsReport 2.4.0-preview.26410.3, Microsoft.Testing.Platform 2.4.0-preview.26410.3. .NET SDK 10.0.302, net10.0, windows-latest hosted agent. Reproduced identically on 2.4.0-preview.26409.6.

Steps To Reproduce

  1. Any MSTest project with the extension enabled:
<Project Sdk="MSTest.Sdk/4.4.0-preview.26410.3">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <EnableMicrosoftTestingExtensionsAzureDevOpsReport>true</EnableMicrosoftTestingExtensionsAzureDevOpsReport>
  </PropertyGroup>
</Project>
  1. Run in a pipeline step (SYSTEM_ACCESSTOKEN mapped):
dotnet test --report-azdo --publish-azdo-test-results
  1. Read a published result: GET /_apis/test/Runs/{runId}/Results/{resultId} and look at automatedTestName.
  2. For the contrast, publish the same suite with PublishTestResults@2 and compare automatedTestName and testCaseReferenceId.

Expected behavior

automatedTestName is the fully-qualified test name, as produced by TestNodeIdentity.GetTestName(testNode) and as the TRX/VSTest converters already emit — matching what PublishTestResults@2 publishes, so test identity and history survive the migration:

E2E.OIS.Tests.AuthenticationTests.LogoutFlow_ShouldSucceed

Actual behavior

The TestNode.Uid GUID is published. Same test, same pipeline, one day apart:

LIVE : refId=93454  automatedTestName=1b29c022-8cae-8e69-a060-a4d6ac1e90e8       storage=E2E
TASK : refId=25783  automatedTestName=E2E.OIS.Tests.AuthenticationTests.LogoutFlow_ShouldSucceed   storage=e2e.dll

All 90 results of the live-published run carry a GUID. The UID is stable across builds — two consecutive builds produced the same GUID and the same testCaseReferenceId — so this is not flakiness in the identity itself; it is a stable identity disconnected from the one every previous run used.

The fully-qualified name is available on the very same TestNode: a TRX report from the same run records className="Probe.LivePublishProbe" name="FlakyPassesOnRetry", which resolves through the same property chain GetTestName walks.

Additional context

AzureDevOpsTestResultsPublisher.CreateTestCaseResult:

string value = testNode.Uid.Value;               // <- becomes automatedTestName
...
CreateResult(testNode.DisplayName, value, automatedTestStorage, "Failed", ...);

A related, smaller difference in the same identity tuple: automatedTestStorage is the assembly name without extension (E2E), whereas the agent publishes the file name (e2e.dll). Since Azure DevOps resolves the test-case reference from the name/storage pair, aligning both would let existing history carry over.

Activity

  1. DanielGilOrtiz commented on Aug 11, 2026

    @DanielGilOrtiz

    Filed this from my other account by mistake — I'm also the reporter of #10360.
    Following up from this account.

  2. changed the title [-]--publish-azdo-test-results publishes automatedTestName as the TestNode UID instead of the fully-qualified test name, orphaning Azure DevOps test history[/-] [+]`--publish-azdo-test-results` publishes automatedTestName as the TestNode UID instead of the fully-qualified test name, orphaning Azure DevOps test history[/+] on Aug 11, 2026
  3. DanielGilOrtiz commented on Aug 24, 2026

    @DanielGilOrtiz

    Hi Amaury Levé (@Evangelink), have you had a chance to review it? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions