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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
.NET Day
August 29, 2025
Technology
24
0
Share
.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
29
.NET Day 2025: Most Expensive Design Mistakes (Ever) and how to avoid them
dotnetday
0
32
.NET Day 2025: Turbocharged: Writing High-Performance C# and .NET Code
dotnetday
0
43
.NET Day 2025: Developing ASP.NET Core Microservices with Dapr: A practical guide
dotnetday
0
39
.NET Day 2025: Enhancing Legal Document Analysis with Reflection Agents, Semantic Kernel, and Azure AI Search
dotnetday
0
30
.NET Day 2025: .NET Core Testing: pushing the limits
dotnetday
0
44
.NET Day 2025: The best ways to use the latest OpenAPI features in .NET 9!
dotnetday
0
35
.NET Day 2025: Supercharged Search with Semantic Search and Vector Embeddings
dotnetday
0
32
.NET Day 2025: Tickets to Ride: Conquering Booking Chaos with Resilient .NET Architecture
dotnetday
0
33
Other Decks in Technology
See All in Technology
EdgeプロファイルでAWSアカウントを安全に使い分ける
jhashimoto
0
100
freee-mcpを Local→Remote で出してわかった MCP認可実装のリアル
terara
3
630
ソフトウェアサプライチェーン攻撃対策として今からサクッとできること
flatt_security
2
130
はじめてのAI-DLC
yoshidashingo
2
530
Loadbalancing exporter internals
ymotongpoo
1
130
Amazon CloudFrontにおけるAIボットアクセス制御のポイント
kizawa2020
4
270
なぜハノーバーメッセに行くべきなのか 〜初参加だから語れること〜
tanakaseiya
0
110
NFLコンペ2026 解法
lycorptech_jp
PRO
0
110
AI時代の私の技術インプットとアウトプット術
tonkotsuboy_com
7
4.3k
「使われるデータ基盤」を目指してデータアナリストとワークショップをやった話
jackojacko_
2
860
サプライチェーン攻撃への備えについて考えている #湘なんか
stefafafan
3
2.4k
形式手法特論:公平性制約の位相的特徴づけ #kernelvm / Kernel VM Study Kansai 12th
ytaka23
0
160
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
360
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
510
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Building Applications with DynamoDB
mza
96
7k
Between Models and Reality
mayunak
4
300
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
540
Fireside Chat
paigeccino
42
3.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
How to Talk to Developers About Accessibility
jct
2
210
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