How to create maintainable and testable Blazor components
summary
Shows how to build a reflective dynamic data-table that reads TItem properties, then refactors it into header and row subcomponents to improve cohesion and single-responsibility; demonstrates tests with bUnit (fast unit-run, semantic markup matching), how to stub or mock children via component factories/AddComponent and StopComponent, and when to use Moq or render templates; includes examples verifying component composition, DOM output, and stable CI-friendly tests.
AI-written summary · about
chapters (4)
- 0:00Principles of maintainable components
- 25:06Introduction to bUnit testing
- 28:39Advanced testing strategies
- 53:25Closing and acknowledgments
related talks
36mHow to create maintainable and testable Blazor components
55mBest practices unit testing Blazor components with bUnit
38mTesting Blazor Application Components: Fun with Benefits
37mTesting Blazor Components
01h 16mTest-Driven Development With Blazor
39mBlazor Stability Testing for Bullet Proof Application
59mBlazor-testing from A to Z
19mImportance of testing & the right way to test React components
