Skip to content

Skip failed TRX attachment copies#8449

Merged
Evangelink merged 10 commits into
mainfrom
copilot/fix-bad-attachment-handling
May 21, 2026
Merged

Skip failed TRX attachment copies#8449
Evangelink merged 10 commits into
mainfrom
copilot/fix-bad-attachment-handling

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

A missing or inaccessible test attachment could abort TRX generation for the entire run. Attachment copy failures should be reported without dropping otherwise valid test results.

  • Attachment copy handling

    • Catch per-attachment IOException and UnauthorizedAccessException.
    • Skip only the failed attachment.
    • Continue copying remaining attachments and generating the TRX.
  • TRX warning output

    • Add RunInfo warning entries for skipped attachments.
    • Reuse the RunInfo path for crash/exit-code messages.
  • Regression coverage

    • Added a test covering one failed per-test attachment copy while another attachment is still emitted.
<RunInfo outcome="Warning">
  <Text>Unable to copy attachment '...' into the TRX results directory. The attachment will be skipped. Reason: UnauthorizedAccessException.</Text>
</RunInfo>

Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 08:06
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 08:16
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 08:18
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 08:19
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 08:21
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 08:23
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 08:24
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 08:25
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 21, 2026 08:27
Copilot AI review requested due to automatic review settings May 21, 2026 08:27
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 08:29
Copilot AI changed the title [WIP] Fix TRX generation to skip bad attachments Skip failed TRX attachment copies May 21, 2026
Copilot AI requested a review from Evangelink May 21, 2026 08:30
Comment thread test/UnitTests/Microsoft.Testing.Extensions.UnitTests/TrxTests.cs Dismissed
@Evangelink Evangelink marked this pull request as ready for review May 21, 2026 11:21
Copilot AI review requested due to automatic review settings May 21, 2026 11:21
@Evangelink Evangelink merged commit 9470e4e into main May 21, 2026
4 of 14 checks passed
@Evangelink Evangelink deleted the copilot/fix-bad-attachment-handling branch May 21, 2026 11:21
Copilot AI review requested due to automatic review settings May 21, 2026 11:42
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.

[MTP Reporters Analysis] TrxReport lets one bad attachment abort the whole TRX

2 participants