Skip to content

Improve Blazor WebAssembly E2E startup diagnostics - #68200

Merged
akoeplinger merged 2 commits into
mainfrom
pureween-wasm-readiness-diagnostics
Aug 6, 2026
Merged

akoeplinger merged 2 commits into
mainfrom
pureween-wasm-readiness-diagnostics

Conversation

@PureWeen

@PureWeen PureWeen commented Aug 4, 2026

Copy link
Copy Markdown
Member

Improve Blazor WebAssembly E2E startup diagnostics

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Fail fast when non-trimmed WASM E2E prerequisites are missing

Description

We started this while trying to make Components issue reproduction and build workflows easier for contributors and coding agents. While using Copilot to reproduce an unrelated Components issue in a fresh local worktree, incomplete E2E client outputs caused setup friction to dominate the investigation.

With the loaded runtime manifest missing, /subdir still returned 200, framework asset requests returned 500, and the unchanged test failed after about 4.3 minutes without clearly identifying the missing prerequisite.

This one-file change validates the exact inputs used by the non-trimmed client/WASM fixture before creating the host:

  • The loaded client assembly
  • The resolved content root
  • wwwroot/index.html beneath that content root
  • The runtime manifest beside the loaded assembly
  • The endpoints manifest beside the loaded assembly

When an input is missing, startup now fails in about 12 seconds and reports every exact path with found/missing status plus the dependency-aware rebuild command. The guidance notes that a --no-dependencies build can copy existing dependency outputs, but it does not rebuild referenced client apps, so it should not be used when referenced app outputs may be stale or missing.

Valid unchanged baselines passed for BasicTestApp, StandaloneApp (a second direct generic TProgram fixture), and the independent server-execution path. Trimmed-app mode returns before the new guard and remains unchanged.

This intentionally detects missing prerequisites only. It does not attempt to validate stale-but-present manifest contents.

Fixes #N/A

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: b5edf21b-722e-40e5-bf3a-1a3da70f8e44
@PureWeen
PureWeen marked this pull request as ready for review August 4, 2026 19:33
@PureWeen
PureWeen requested a review from a team as a code owner August 4, 2026 19:33
Copilot AI review requested due to automatic review settings August 4, 2026 19:33

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

This PR improves diagnostics for Blazor WebAssembly E2E test startup by proactively validating that the non-trimmed WASM client outputs (and associated static web assets manifests) are present before starting the gateway host, so missing prerequisites fail fast with actionable details.

Changes:

  • Adds pre-start validation for the client assembly path, content root, wwwroot/index.html, and the .staticwebassets.*.json manifests.
  • Updates host args to reuse the newly computed runtime/endpoints manifest paths.
  • Improves the failure experience with a detailed exception message and rebuild guidance.
Show a summary per file
File Description
src/Components/test/E2ETest/Infrastructure/ServerFixtures/BlazorWasmTestAppFixture.cs Adds prerequisite checks and clearer startup failure diagnostics for non-trimmed WASM E2E fixtures.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: b5edf21b-722e-40e5-bf3a-1a3da70f8e44
@PureWeen PureWeen mentioned this pull request Aug 5, 2026
3 of 4 tasks
@akoeplinger
akoeplinger merged commit dc1fb6c into main Aug 6, 2026
29 checks passed
@akoeplinger
akoeplinger deleted the pureween-wasm-readiness-diagnostics branch August 6, 2026 14:28
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants