Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 24, 2026

Recent MSTest 4.1 previews were missing the Output element in TRX files for failed tests due to reading IsTrxEnabled before it was set. The fix is merged; this adds the missing test coverage.

Changes

  • New test: MSTest.Acceptance.IntegrationTests/TrxReportTests.cs
    • Verifies failed test TRX output contains <Output>, <ErrorInfo>, <Message>, and <StackTrace> elements
    • Validates exception message content matches expected assertion failure
    • Runs across all target frameworks

The test generates a minimal MSTest project with a failing assertion, executes with --report-trx, and parses the TRX file to ensure all exception details are present.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • x3yvsblobprodcus370.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/testfx/testfx/.dotnet/dotnet /home/REDACTED/work/testfx/testfx/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/testfx/testfx/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/testfx/testfx/artifacts/toolset/11.0.0-beta.26071.3.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Latest 4.1 previews are not adding exception info for failed tests in TRX (MTP)</issue_title>
<issue_description>## Describe the bug

Latest MSTest 4.1 previews are missing Output element under UnitTestResult in TRX files. This is because we read IsTrxEnabled early in the bridge before it has been set, causing the bridge to not add any of the Trx test node properties.

Steps To Reproduce

Write a failed test, run with dotnet run --report-trx.

Expected behavior

Exception message and stack trace are present

Actual behavior

Not present.

Additional context

Regressed in #6872. The regression hasn't shipped in a stable release yet.</issue_description>

<agent_instructions>The described issue is already fixed. Only an integration acceptance test is needed.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@Youssef1313 Fix merged. We only need a test here.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 24, 2026 08:22
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
…ning

Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Copilot AI changed the title [WIP] Add integration acceptance test for TRX exception info Add integration test for TRX exception info regression Jan 24, 2026
Copilot AI requested a review from Youssef1313 January 24, 2026 08:26
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.

Latest 4.1 previews are not adding exception info for failed tests in TRX (MTP)

2 participants