Sign in to confirm you’re not a bot
This helps protect our community. Learn more

Welcome!

0:00

About OSS PowerUps

1:11

Hello Egil and Steven!

3:21

What is bUnit and why is it necessary?

9:37

Installing bUnit into a project

14:27

Testing a Counter component

20:00

Let's make that test fail!

25:44

About Speed, JavaScript and end-to-end tests

26:44

NET CLI template (dotnet new)

32:24

Mixed test flavors (Razor vs. C#)

33:00

MarkupMatches assertions

36:02

Cascading parameters in Razor tests

40:07

What should you test?

43:07

Cascading parameters in C# tests

47:55

Razor compiler

52:02

Injecting dependencies/services into components

53:35

Stubbing components (e.g., third-party)

55:38

Generation of stub classes (source generators?)

1:07:58

Debugging

1:15:18

Mocking JavaScript calls

1:18:12

Outro

1:24:30
OSS Power-Ups: bUnit
In this talk, you will learn how to get started creating tests for your Blazor components using bUnit, in a way that feels almost like regular unit testing. bUnit is a library you add to a regular .NET testing project, e.g., a xUnit test project, that allows you to render your component with minimal effort, inspect the produced markup after each render and interact with the component under test. There is no browser involved, headless or otherwise, which means tests run fast and are predictable, just like regular unit tests. The talk will cover all the basics, from setting up a bUnit test project to writing tests that render and interact with Blazor components. Speakers: Egil Hansen and Steven Giesel https://github.com/bUnit-dev/bUnit   / egilhansen     / steven-giesel   #dotnet #blazor #bunit Host: Matthias Koch 0:00 Welcome! 1:11 About OSS PowerUps 3:21 Hello Egil and Steven! 9:37 What is bUnit and why is it necessary? 14:27 Installing bUnit into a project 20:00 Testing a Counter component 25:44 Let's make that test fail! 26:44 About Speed, JavaScript and end-to-end tests 32:24 .NET CLI template (dotnet new) 33:00 Mixed test flavors (Razor vs. C#) 36:02 MarkupMatches assertions 40:07 Cascading parameters in Razor tests 43:07 What should you test? 47:55 Cascading parameters in C# tests 52:02 Razor compiler 53:35 Injecting dependencies/services into components 55:38 Stubbing components (e.g., third-party) 1:07:58 Generation of stub classes (source generators?) 1:15:18 Debugging 1:18:12 Mocking JavaScript calls 1:24:30 Outro

Follow along using the transcript.

JetBrains

209K subscribers