Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
.NET Day 2025: Future-Proof Your Blazor Apps wi...
Search
.NET Day
August 29, 2025
Technology
33
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
.NET Day 2025: Future-Proof Your Blazor Apps with bUnit
.NET Day
August 29, 2025
More Decks by .NET Day
See All by .NET Day
.NET Day 2025: How to Lie with AI: Understanding Bias, Ethics, and the Hidden Risks in Machine Learning
dotnetday
0
40
.NET Day 2025: Most Expensive Design Mistakes (Ever) and how to avoid them
dotnetday
0
52
.NET Day 2025: Turbocharged: Writing High-Performance C# and .NET Code
dotnetday
0
63
.NET Day 2025: Developing ASP.NET Core Microservices with Dapr: A practical guide
dotnetday
0
46
.NET Day 2025: Enhancing Legal Document Analysis with Reflection Agents, Semantic Kernel, and Azure AI Search
dotnetday
0
37
.NET Day 2025: .NET Core Testing: pushing the limits
dotnetday
0
55
.NET Day 2025: The best ways to use the latest OpenAPI features in .NET 9!
dotnetday
0
50
.NET Day 2025: Supercharged Search with Semantic Search and Vector Embeddings
dotnetday
0
40
.NET Day 2025: Tickets to Ride: Conquering Booking Chaos with Resilient .NET Architecture
dotnetday
0
43
Other Decks in Technology
See All in Technology
モバイルアプリ開発概論2026
recruitengineers
PRO
1
320
データ組織の転換期 一足飛びしない段階的戦略
leveragestech
PRO
0
150
モノリス Rails でも日中に rails db:migrate を走らせたい! / Daytime rails db:migrate on Monolithic Rails!
euglena1215
3
440
AIがコードを書く時代、人間は何を保証するのか———馬場さんと考える、開発者に求められる新しい責任と価値 - TECH PLAY
netmarkjp
0
1.3k
Issue設計から始める仕様駆動開発 / 20260731 Mizuki Hirata
shift_evolve
PRO
1
130
【CEDEC2026】専門性の高いデフォルメチームが挑んだ人材育成戦略 〜Cygames Academiaの企画から実施まで〜
cygames
PRO
0
320
侵入は突然に 〜 IoTマルウェアと悪用される家庭の機器 ~ / When Intrusion Strikes: IoT Malware and the Abuse of Home Devices
nttcom
0
1.5k
ブラウザ研修 2026
recruitengineers
PRO
3
500
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
53k
LangfuseによるLLMOps基盤の構築と活用事例
zozotech
PRO
1
280
新しい SLO が良い感じにハマっている話
z63d
4
2.1k
Cursor Meetup Sapporo - Cursor物語 続編
cocacola917
0
120
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.2k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
700
Thoughts on Productivity
jonyablonski
76
5.3k
What's in a price? How to price your products and services
michaelherold
247
13k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
330
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
460
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
190
Are puppies a ranking factor?
jonoalderson
1
3.8k
The Curious Case for Waylosing
cassininazir
1
450
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
650
Test your architecture with Archunit
thirion
1
2.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Transcript
Future-proof Your Blazor Apps with bUnit
Who is this guy? • Hans Muns • Software Developer
& Microsoft Certified trainer @ Vitas • Newest hobby: Dog owner
The history of Blazor testing 2006 Selenium Release 2018 Blazor
Release 2020 Playwright Release 2021 bUnit Release
Why do we need a new tool? Relatively slow Not
designed for component/unit testing Mocking is hard Require browser setup
What is bUnit?
What is bUnit? It’s not a replacement for xUnit, NUnit,
TUnit, or any other unit testing framework. It’s an addition.
What is bUnit? Open-source testing library for Blazor components Enables
‘regular’ unit testing experience Supported by the .NET Foundation Doesn’t run in the browser, doesn’t run Javascript
What is bUnit?
How can we hello world this?
How can we hello world this?
How can we hello world this?
How can we hello world this?
Let’s explore a real- world use case
None
Let’s make a plan 1. Third-party components 2. Parameters &
callbacks 3. Dependency injection . 4. Verifying output.
Working with third-party components
Working with third-party components
Working with third-party components
Working with third-party components
Parameters and callbacks
Dependency injection
Semantic comparison
Semantic comparison
Semantic comparison diff:ignore <attribute>:ignore diff:ignoreChildren diff:ignoreAttributes diff:whitespace=“Normalize” diff:ignoreCase <attribute>:ignoreCase diff:regex
Let’s demo
Even more cool features Faking authorization Emulating JSRuntime Faking persistentComponentState
Faking NavigationManager Faking IWebAssemblyHostEnvironment InputFile helper to test uploading files
Let’s compare with Playwright
Comparing the counter test
Comparing the counter test
Comparing the counter test
bUnit FAQ Does bUnit replace testing tools like Selenium/Playwright? Are
there any limitations when using third party components? How can I integrate bUnit in my CI/CD pipelines? How do you go about testing javascript heavy components?
Recap Enables true unit testing Setting up your bUnit project
Semantic comparison An addition to our testsuite Mocking components Compared to other tools
Were to find more https://bunit.dev/ https://github.com/bUnit-dev/bUnit https://learn.microsoft.com/en- us/shows/visual-studio- toolbox/testing-blazor- components-with-bunit
Let’s stay connected