Skip to content

Fix HTML report duration for parallel test runs - #10944

Merged
Amaury Levé (Evangelink) merged 3 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/fix-html-report-wall-clock-duration
Sep 2, 2026
Merged

Amaury Levé (Evangelink) merged 3 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/fix-html-report-wall-clock-duration

Conversation

@Evangelink

Copy link
Copy Markdown
Member

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

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>
Copilot AI balanced review requested due to automatic review settings September 2, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copilot AI review requested due to automatic review settings September 2, 2026 09:56
@Evangelink Amaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Sep 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 High severity

New issues introduced by this change (1)
Severity Finding
High severity 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>
Copilot AI review requested due to automatic review settings September 2, 2026 10:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
High severity src/​Platform/​Microsoft.Testing.Extensions.HtmlReport/​HtmlReportMerger.cs — This semantic change leaves two existing unit tests with guaranteed failures.… View resolved comment

@Evangelink
Amaury Levé (Evangelink) merged commit a2fb519 into microsoft:main Sep 2, 2026
31 of 35 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/amauryleve/fix-html-report-wall-clock-duration branch September 2, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HtmlReport: Duration summary card sums per-test durations instead of showing wall-clock time

3 participants