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
38
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
Mis-Estimating – why estimating effort does not work
dotnetday
0
10
Supercharge Your Agents: Custom Tools, MCP, and Microsoft Foundry
dotnetday
0
10
Focus in a Fragmented World: A Developer’s Guide to Staying Productive
dotnetday
0
10
Release anytime: Mastering feature flags in .NET and Azure
dotnetday
0
12
Vertical Slice Architecture - Are slices better than layers?
dotnetday
0
10
.NET Day 2025: How to Lie with AI: Understanding Bias, Ethics, and the Hidden Risks in Machine Learning
dotnetday
0
41
.NET Day 2025: Most Expensive Design Mistakes (Ever) and how to avoid them
dotnetday
0
63
.NET Day 2025: Turbocharged: Writing High-Performance C# and .NET Code
dotnetday
0
70
.NET Day 2025: Developing ASP.NET Core Microservices with Dapr: A practical guide
dotnetday
0
58
Other Decks in Technology
See All in Technology
あなたの知らないバージョン命名規則
sat
PRO
2
760
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
12
85k
GopherCon @シアトル に行ってきました
logica0419
0
270
アクセスキー流出時の対応で再認識した攻撃側と防御側の非対称性について
kazzpapa3
0
300
[potatotips #96] Give Your AI Agent the Flutter Playbook
korodroid
0
170
Kiro5兄弟のいまどきのセキュリティ基礎知識
kentapapa
0
270
Introduction to Bill One Development Engineer
sansan33
PRO
0
470
カーネルまで探検して理解するふたつの自動計装
sumiyae
0
320
コミュニティから始まった農業IoTとの7年間 ——人との関わりが教えてくれたこと
peacemaker07
0
110
AIで変わるエンジニアの働き方(仮)
naoinaoi
0
550
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
Microsoft MVP プログラムを紹介するから目指す人増えてくれ
tsubakimoto_s
0
110
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
How to Talk to Developers About Accessibility
jct
2
520
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
510
Rails Girls Zürich Keynote
gr2m
96
14k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
220
Building Applications with DynamoDB
mza
96
7.2k
Marketing to machines
jonoalderson
1
5.7k
Producing Creativity
orderedlist
PRO
348
40k
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