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
32
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
38
.NET Day 2025: Most Expensive Design Mistakes (Ever) and how to avoid them
dotnetday
0
45
.NET Day 2025: Turbocharged: Writing High-Performance C# and .NET Code
dotnetday
0
60
.NET Day 2025: Developing ASP.NET Core Microservices with Dapr: A practical guide
dotnetday
0
44
.NET Day 2025: Enhancing Legal Document Analysis with Reflection Agents, Semantic Kernel, and Azure AI Search
dotnetday
0
34
.NET Day 2025: .NET Core Testing: pushing the limits
dotnetday
0
54
.NET Day 2025: The best ways to use the latest OpenAPI features in .NET 9!
dotnetday
0
47
.NET Day 2025: Supercharged Search with Semantic Search and Vector Embeddings
dotnetday
0
39
.NET Day 2025: Tickets to Ride: Conquering Booking Chaos with Resilient .NET Architecture
dotnetday
0
42
Other Decks in Technology
See All in Technology
Control Planeで育てるBtoB SaaSの認証基盤 - SRE NEXT 2026
pokohide
1
2.3k
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
150
DatabricksにおけるMCPソリューション
taka_aki
1
240
「早く出す」より「事業に効く」 ── 顧客の業務サイクルから逆算するAI時代の二重ループ開発と「変化の設計者」 / devsumi2026
rakus_dev
1
210
Terraform共通モジュールをチーム横断で“変えられる”運用へ ― リリースと適用の分離
kekke_n
1
2.8k
AI駆動開発におけるQAエンジニアの役割事例 〜AI駆動開発の現場から〜
kobayashiyorimitsu
0
490
AI Driven AI Governance
pict3
0
330
関数型の考えを TypeScript に持ち込んで、テストしやすい純粋関数を増やす / Pure at the Core, Effects at the Edge: Bringing Functional Thinking into TypeScript
kaminashi
1
110
クラウド上のデータ復旧で見落としがちな制約: 医療系 SaaS の BCP 設計から得た教訓
kakehashi
PRO
0
3.4k
LLM/Agent評価:トップ営業の発言を「正解」にする 〜暗黙的正解による評価を営業資産に変える〜
takkuhiro
1
210
Mastraエージェント、どのクラウドにデプロイする?
minorun365
PRO
2
180
最適な自走を最小限の支援で — M&Aで拡大する組織で少人数SREが挑んだ1年 / SRE NEXT 2026
genda
0
1.1k
Featured
See All Featured
Balancing Empowerment & Direction
lara
6
1.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Making the Leap to Tech Lead
cromwellryan
135
10k
The browser strikes back
jonoalderson
0
1.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
For a Future-Friendly Web
brad_frost
183
10k
Technical Leadership for Architectural Decision Making
baasie
3
440
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
330
Mobile First: as difficult as doing things right
swwweet
225
10k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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