Repository navigation
Fix HTML report duration for parallel test runs - #10944
Amaury Levé (Evangelink) merged 3 commits into
Conversation
Use report start and end times for summary duration, including merged reports, and cover overlapping parallel tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation matches the reported requirement and includes effective unit and acceptance coverage.
Review tier: Balanced
Findings: None
What changed in this PR
Updates HTML report summaries to show wall-clock elapsed time rather than summed test durations.
Changes:
- Computes report duration from start/end timestamps.
- Applies the same calculation to merged reports.
- Adds unit and parallel-run acceptance coverage.
| File | Description |
|---|---|
HtmlReportEngine.cs |
Uses report elapsed time in summaries. |
HtmlReportMerger.cs |
Uses the overall merged timestamp interval. |
HtmlReportEngineTests.cs |
Verifies generated and merged durations. |
HtmlReportTests.cs |
Tests overlapping parallel execution end-to-end. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Existing artifact post-processor tests retain summed-duration expectations and will fail.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/Platform/Microsoft.Testing.Extensions.HtmlReport/HtmlReportMerger.cs — This semantic change leaves two existing unit tests with guaranteed failures.… |
Align artifact post-processor tests with the wall-clock duration contract. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation matches the requested duration semantics and includes appropriate unit and acceptance coverage.
Review tier: Balanced
Findings: None
Issues resolved since last review (1)
| Severity | Finding |
|---|---|
src/Platform/Microsoft.Testing.Extensions.HtmlReport/HtmlReportMerger.cs — This semantic change leaves two existing unit tests with guaranteed failures.… View resolved comment |
a2fb519
into
microsoft:main

The HTML report currently labels the sum of individual test durations as "Duration", which overstates elapsed time when tests run in parallel. Use the report start and end timestamps instead so the summary reflects wall-clock duration for both individual and merged reports.
Per-test and retry-attempt durations remain unchanged. Unit coverage verifies generated and merged summaries, and an acceptance test runs two overlapping tests and confirms the summary matches the report's elapsed interval.
Fixes: #10921