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
0
6
.NET Day 2025: Future-Proof Your Blazor Apps with bUnit
.NET Day
August 29, 2025
Tweet
Share
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
10
.NET Day 2025: Most Expensive Design Mistakes (Ever) and how to avoid them
dotnetday
0
11
.NET Day 2025: Turbocharged: Writing High-Performance C# and .NET Code
dotnetday
0
18
.NET Day 2025: Developing ASP.NET Core Microservices with Dapr: A practical guide
dotnetday
0
10
.NET Day 2025: Enhancing Legal Document Analysis with Reflection Agents, Semantic Kernel, and Azure AI Search
dotnetday
0
11
.NET Day 2025: .NET Core Testing: pushing the limits
dotnetday
0
10
.NET Day 2025: The best ways to use the latest OpenAPI features in .NET 9!
dotnetday
0
10
.NET Day 2025: Supercharged Search with Semantic Search and Vector Embeddings
dotnetday
0
7
.NET Day 2025: Tickets to Ride: Conquering Booking Chaos with Resilient .NET Architecture
dotnetday
0
12
Other Decks in Technology
See All in Technology
全てGoで作るP2P対戦ゲーム入門
ponyo877
3
1.1k
PythonとLLMで挑む、 4コマ漫画の構造化データ化
esuji5
0
110
非エンジニアのあなたもできる&もうやってる!コンテキストエンジニアリング
findy_eventslides
3
760
PyCon JP 2025 DAY1 「Hello, satellite data! ~Pythonではじめる衛星データ解析~」
ra0kley
0
640
Beyond Multiprocessing: A Real-World ML Workload Speedup with Python 3.13+ Free-Threading
kitsuya0828
0
300
GopherCon Tour 概略
logica0419
2
110
施策が均質化する採用市場で何を捨て 何を大事にしていくかを考える
akyun
0
220
コンパウンドスタートアップにおけるQAの成長戦略
matsu802
4
560
今改めてServiceクラスについて考える 〜あるRails開発者の10年〜
joker1007
18
8.3k
CData MCP ナイト!「CData × Oracleで実現する新しいデータ活用 ― 国産SaaS 連携から MCP Server for Oracle Database まで」
shisyu_gaku
0
180
新卒QAエンジニアの成長戦略
qatonchan
0
290
kaigi_on_rails_2025_設計.pdf
nay3
8
3.4k
Featured
See All Featured
A better future with KSS
kneath
239
17k
Unsuck your backbone
ammeep
671
58k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Context Engineering - Making Every Token Count
addyosmani
3
130
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Visualization
eitanlees
148
16k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
Why Our Code Smells
bkeepers
PRO
339
57k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
3k
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