Skip to content

Fix Azure DevOps published test identity - #10706

Merged
Amaury Levé (Evangelink) merged 2 commits into
mainfrom
dev/amauryleve/fix-azdo-test-name
Aug 25, 2026
Merged

Amaury Levé (Evangelink) merged 2 commits into
mainfrom
dev/amauryleve/fix-azdo-test-name

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Azure DevOps live publishing currently sends the opaque TestNode UID as automatedTestName, which disconnects results from history created by PublishTestResults@2 and prevents the extension's history-based reporting from matching tests.

Use the shared canonical identity resolver to publish the fully-qualified test name. Also align automatedTestStorage with TRX publication by using the lowercase assembly filename with its extension. Regression coverage verifies that an opaque node UID does not leak into the published result while rerun and data-driven result identity remains stable.

Fixes #10557

Use the canonical fully-qualified test name and the assembly filename expected by Azure DevOps so live-published results retain existing test history.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0037316d-a7be-4fdb-8083-f503f1e49652
Copilot AI balanced review requested due to automatic review settings August 24, 2026 17:42

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

✅ 22/22 dimensions clean — no findings.

Summary: The change correctly replaces the opaque TestNode.Uid.Value with the shared TestNodeIdentity.GetTestName resolver for automatedTestName, aligning Azure DevOps live publishing with TRX/VSTest-bridge identity semantics. The automatedTestStorage change from Path.GetFileNameWithoutExtension to Path.GetFileName(...).ToLowerInvariant() matches TRX publication conventions. No public API surface changes. New test (CreateTestCaseResult_UsesFullyQualifiedNameAsAutomatedTestName) directly validates the FQN resolution, and the CreateNode helper update with SerializableKeyValuePairStringProperty ensures existing tests exercise the fallback path through TestNodeIdentity. All storage assertions updated consistently.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Azure DevOps live-published test identity to match TRX-based history.

Changes:

  • Publishes canonical fully qualified test names.
  • Uses lowercase assembly filenames, including extensions, for storage.
  • Updates regression, rerun, and data-driven tests.
Show a summary per file
File Description
AzureDevOpsLivePublishingTests.cs Verifies canonical names and storage identity.
AzureDevOpsTestResultsPublisher.ResultFactory.cs Resolves canonical test names.
AzureDevOpsResultIdStore.cs Updates identity-key documentation.
AzureDevOpsPublishConfigurationFactory.cs Aligns storage names with TRX publication.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions

This comment has been minimized.

Introduce a non-null local after the assertion so code-quality analysis can prove subsequent result access is safe.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0037316d-a7be-4fdb-8083-f503f1e49652
Copilot AI review requested due to automatic review settings August 24, 2026 17:53
@github-actions

Copy link
Copy Markdown
Contributor

🧵 Parallel-safety audit — PR #10706

Nothing audited here touches process-global state, shared filesystem paths, or [ResourceLock] / [DoNotParallelize] declarations. Nothing to flag for parallel-safety.

Audited Microsoft.Testing.Extensions.UnitTests at scope MethodLevel, workers CPU count (via [assembly: Parallelize(Scope = ExecutionScope.MethodLevel, Workers = 0)]).

The changed test methods (CreateTestCaseResult_UsesFullyQualifiedNameAsAutomatedTestName, CreatePublisher_UsesSanitizedRunNameAndStorageFileName, and related assertion updates) construct test data locally, use per-test isolated TestDirectory fixtures, and only affect string formatting/naming logic (AutomatedTestStorage, AutomatedTestName). No environment variables, current-directory, console state, culture defaults, static fields, or shared filesystem paths are mutated or newly declared/removed.

Re-run with /parallel-audit.

🤖 Automated content by GitHub Copilot. Generated by the Parallel-safety audit on PR (on open / sync) workflow. · auto · 36.9 AIC · ⌖ 3.14 AIC · ⊞ 24.8K · [◷]( · ◷)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@Evangelink Amaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 25, 2026
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) August 25, 2026 07:23
@Evangelink
Amaury Levé (Evangelink) merged commit 9bbfc32 into main Aug 25, 2026
46 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/amauryleve/fix-azdo-test-name branch August 25, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

3 participants