Skip to content

Include test display name in AzDO error reports - #7026

Merged
Amaury Levé (Evangelink) merged 4 commits into
mainfrom
copilot/add-display-name-to-errors
Dec 1, 2025
Merged

Amaury Levé (Evangelink) merged 4 commits into
mainfrom
copilot/add-display-name-to-errors

Conversation

Copilot AI commented Dec 1, 2025 •

Copy link
Copy Markdown
Contributor

Fixes #7024

Azure DevOps error reports now include the test display name, making it easier to identify which test failed directly from the CI output.

Changes

  • GetErrorText: Added testDisplayName parameter; prefixes error message with [TestDisplayName] when provided. Constructs the full message first and escapes once for cleaner code.
  • WriteExceptionAsync: Updated to pass display name through the call chain
  • ConsumeAsync: Extracts TestNode.DisplayName and forwards it to error reporting
  • Tests: Updated existing test and added coverage for null display name case. Improved test comments explaining why ## is trimmed.

Output Format

##vso[task.logissue type=error;sourcepath=file.cs;linenumber=42;columnnumber=1][MyTestClass.TestMethod] Assert.Equal failed

When display name is null/empty, falls back to previous format (message only).

Original prompt

This section details on the original issue you should resolve

<issue_title>AzDO should display the display name of the failing test</issue_title>
<issue_description>Today we should error and stack trace in AzDO report extension. We should include also the display name of the test, at least.</issue_description>

Comments on the Issue (you are Copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI changed the title [WIP] Add display name to failing test reports in AzDO Include test display name in AzDO error reports Dec 1, 2025
@Evangelink
Amaury Levé (Evangelink) marked this pull request as ready for review December 1, 2025 13:06

@nohwnd Jakub Jareš (nohwnd) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^^^

Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
@Evangelink
Amaury Levé (Evangelink) deleted the copilot/add-display-name-to-errors branch December 1, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AzDO should display the display name of the failing test

4 participants