Blazor-testing from A to Z
summary
Uses Playwright for browser-driven E2E with Chromium, WebApplicationFactory-hosted app on a random localhost port, headless runs and trace ZIPs (screenshots, DOM, network) that replay locally; demonstrates clicking the counter button to get current count equals 1 and controlling the weather API to return a set number of rows for stable asserts. Uses bUnit to render components in-process, inject fake services, inspect component instances (dismissed == true), and uses Verify snapshots with semantic markup comparison to ignore class/attribute ordering. Recommends mixing tools by tradeoffs.
AI-written summary · about
chapters (4)
- 0:00Introduction to testing
- 1:56Browser-driven testing
- 29:35Component testing with bUnit
- 46:55Choosing testing strategies
related talks
39mBlazor Stability Testing for Bullet Proof Application
01h 16mTest-Driven Development With Blazor
01h 02m1,2,3… testing: is this thing on(line)? Meet your new Microsoft Testing tools
28mTesting Web Applications with Playwright
55mBest practices unit testing Blazor components with bUnit
34mEnd to end testing a world of web, mobile & desktop apps
20mTesting Web Applications with Playwright
30mTesting Web Applications with Playwright
