Skip to content

Report active tests on browser-wasm - #10129

Merged
Amaury Levé (Evangelink) merged 2 commits into
mainfrom
dev/amauryleve/browser-wasm-progress
Jul 22, 2026
Merged

Amaury Levé (Evangelink) merged 2 commits into
mainfrom
dev/amauryleve/browser-wasm-progress

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Browser-wasm runs can block the single WASM thread synchronously, leaving users with no indication of which test is hanging. This change emits an immediate, durable running <test> line before each test begins.

The browser output device reuses MTP's keyed progress-message semantics to deduplicate repeated in-progress updates by test UID and clears the key when the test completes so retries remain visible. It honors the existing --progress off and --no-progress controls without enabling the unsupported terminal reporter or changing CLI help.

Focused unit coverage verifies progress options, UID deduplication, suppression, and retry behavior. Browser-wasm acceptance coverage verifies start lines end to end under Node.

Related to #2196, especially issue comment 5032231745.

Emit durable, deduplicated test-start lines from the browser output device and honor the existing progress switches.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 68fe177a-162b-4580-9300-3466dcbb3f2b
Copilot AI review requested due to automatic review settings July 22, 2026 07:45

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.

Pull request overview

Adds durable active-test progress output for browser-wasm runs to help diagnose hangs.

Changes:

  • Emits deduplicated running <test> messages and clears them on completion.
  • Honors --progress and --no-progress.
  • Adds unit and browser-wasm acceptance coverage.
Show a summary per file
File Description
TerminalTestReporterCommandLineOptionsProviderTests.cs Tests progress-option precedence and defaults.
SimplifiedConsoleOutputDeviceTests.cs Tests progress emission, suppression, deduplication, and retries.
BrowserWasmExecutionTests.cs Verifies active-test output under Node.
TerminalOutputDevice.Initialization.cs Reuses centralized progress-option evaluation.
TerminalTestReporterCommandLineOptionsProvider.cs Adds shared progress enablement logic.
SimplifiedConsoleOutputDeviceBase.cs Emits keyed active-test progress messages.
OutputDeviceManager.cs Supplies command-line options to the browser device.
BrowserOutputDevice.cs Enables browser progress according to CLI options.
InternalAPI.Unshipped.txt Tracks new common internal members.

Review details

  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Medium

@Evangelink Amaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Jul 22, 2026
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 22, 2026 07:51
@github-actions

This comment has been minimized.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 68fe177a-162b-4580-9300-3466dcbb3f2b
Copilot AI review requested due to automatic review settings July 22, 2026 07:53

@github-actions github-actions Bot 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.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean PR. The implementation is well-structured: it reuses the existing ProgressMessageOutputDeviceData deduplication infrastructure, correctly gates progress behind DisplayActiveTestProgress, and the refactored IsProgressEnabled helper consolidates previously duplicated logic.

Dimension Verdict
1. Algorithmic Correctness ✅ Clean — early return for in-progress avoids double-counting; testCompleted flag + null-message removal enables re-reporting after completion
2. Threading & Concurrency ✅ Clean — all mutable state access is under _asyncMonitor lock
3. Security & IPC N/A
4. Public API & Binary Compat ✅ Clean — new members are internal/protected virtual on internal class; declared in InternalAPI.Unshipped.txt
5. Performance & Allocations ✅ Minor: interpolated string $"running {DisplayName}" allocates per in-progress event, but this is a low-frequency browser-only path — acceptable
6. Cross-TFM Compat ✅ Clean — gated behind #if NET7_0_OR_GREATER
7–22 ✅ Clean or N/A

No blocking or major issues found. Good test coverage with unit tests for dedup, opt-in/opt-out, and re-report-after-completion scenarios, plus integration test validation.

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.

Review details

  • Files reviewed: 10/10 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test quality grade — PR #10129

GradeTestNotes
A (90–100) mod BrowserWasmExecutionTests.
BrowserWasmExecution_
RunsTestsUnderNode
Adds per-test-name presence assertions inside a progress loop; clear intent and meaningful checks on combined output.
A (90–100) new SimplifiedConsoleOutputDeviceTests.
ConsumeAsync_
CompletedTestNode_
AllowsSameTestToReportProgressAgain
Three-act sequence with AreSequenceEqual verifying the in-progress tracker resets after a completion event.
A (90–100) new SimplifiedConsoleOutputDeviceTests.
ConsumeAsync_
InProgressTestNode_
WhenActiveTestProgressDisabled_
DoesNotWrite
Clear AAA; Assert.IsEmpty confirms no output when the feature flag is off.
A (90–100) new SimplifiedConsoleOutputDeviceTests.
ConsumeAsync_
InProgressTestNode_
WhenActiveTestProgressEnabled_
WritesActiveTestDisplayNameOnce
Calls ConsumeAsync twice, then asserts a single-element sequence — precisely verifies de-duplication.
A (90–100) new TerminalTestReporterCommandLineOptionsProviderTests.
IsProgressEnabled_
NoProgressOption_
ReturnsFalse
Focused single-behavior test; Assert.IsFalse on a meaningful return value.
A (90–100) new TerminalTestReporterCommandLineOptionsProviderTests.
IsProgressEnabled_
NoProgressOptions_
ReturnsTrue
Minimal and precise; verifies default-enabled path with a non-literal Assert.IsTrue result.
A (90–100) new TerminalTestReporterCommandLineOptionsProviderTests.
IsProgressEnabled_
ProgressOption_
ReturnsRequestedState
Data-driven with [DataRow] covering auto, on, and off; equality assertion on all three cases.
A (90–100) new TerminalTestReporterCommandLineOptionsProviderTests.
IsProgressEnabled_
ProgressOption_
TakesPrecedenceOverNoProgressOption
Verifies precedence rule when both options are present; single clear assertion on the outcome.

This advisory comment was generated automatically. Grades are heuristic
and informational — they do not block merging. Re-run with
/grade-tests.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

🤖 Automated content by GitHub Copilot. Generated by the Grade Tests on PR (on open / sync) workflow. · 45.7 AIC · ⌖ 5.13 AIC · ⊞ 8.9K · [◷]( · ◷)

@Evangelink
Amaury Levé (Evangelink) merged commit 0d9a31d into main Jul 22, 2026
33 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/amauryleve/browser-wasm-progress branch July 22, 2026 10:53
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.

3 participants