Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors TRX report generation by moving test-result counting from the TrxReportGenerator/constructor arguments into TrxReportEngine.GenerateReportAsync, simplifying the engine’s construction and adjusting call sites accordingly.
Changes:
- Simplified
TrxReportEngineconstructor by removing stored test message arrays and precomputed counters. - Updated
GenerateReportAsyncto acceptTestNodeUpdateMessage[]and compute summary counters during result generation. - Updated unit tests and out-of-proc TRX generation paths to pass test updates explicitly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
test/UnitTests/Microsoft.Testing.Extensions.UnitTests/TrxTests.cs |
Updates tests to pass TestNodeUpdateMessage[] into GenerateReportAsync and uses the simplified engine constructor. |
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.cs |
Refactors TRX generation API to accept test updates at generation time and computes summary counters via AddResults. |
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs |
Updates out-of-proc crash handling to call the new GenerateReportAsync(TestNodeUpdateMessage[]) overload. |
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxDataConsumer.cs |
Removes per-state counting fields and passes collected test updates into the engine at session finish. |
nohwnd
reviewed
Mar 3, 2026
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.cs
Outdated
Show resolved
Hide resolved
nohwnd
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.