Speaker

Egil Hansen

Egil Hansen

Distinguished Developer at Delegate, Microsoft MVP, creator of bUnit and AngleSharp.Diffing.

Reykjavík, Iceland

Actions

Experienced software developer/architect, international speaker, and Microsoft MVP for developer technologies, with a strong focus on creating maintainable software that solves real business problems in the cloud and on-prem, using techniques and practices such as domain-driven design, test-driven development, and following clean-code principles.

Egil is also the creator and maintainer of bUnit, an open-source library for testing Blazor components, and AngleSharp.Diffing, a library for semantic comparison of HTML in C#.

Egil has worked with many technology stacks and architectural patterns throughout his career. He is now primarily focused on the .NET ecosystem, including backend and front-end technologies, and developing solutions running in the cloud.

Awards

Area of Expertise

  • Information & Communications Technology

Topics

  • .NET
  • ASP.NET Core
  • C#.Net
  • .NET Backend
  • .NET Patterns & Practices
  • ASP.NET Core Web API
  • Testing
  • .NET UI
  • Software testing
  • Automated Testing
  • Test-Driven Development
  • API Testing
  • Unit testing
  • UI Testing
  • Testing and Quality
  • Design Patterns
  • Web

Best Practices for Unit Testing Blazor Components with bUnit

Why create tests of UI components? Isn’t UI tests inherently brittle, run slowly, and hard to maintain?

The answer is no, at least not with bUnit. bUnit is a testing library built to make writing tests for Blazor components feel like writing tests for plain old C# objects (POCOs), which means a lot of the good practices we know from unit testing carries over, as well as the benefits.

This presentation will give a brief introduction to bUnit and then dive into some of the best practices for writing components tests, tests which results in both stable and maintainable test suites as well as maintainable Blazor components.

Blazor-testing from A to Z

This session will discuss and showcase the different Blazor testing strategies, libraries, and tools available to us, so whether you are building a website, web app, or a reusable Blazor component library, you can pick the ones that yield the most bang for the buck.

Specifically, this session covers end-2-end testing, component testing, unit testing, Playwright, bUnit, snapshot testing, semantic markup comparison, emulating user interactions, and how and when to use test doubles (e.g., mocks).

We will cover these topics with the goal of creating tests that protect against regressions, are resistant to refactoring, are maintainable, and give fast feedback.

Testing .NET Web APIs from A to Z

You built an API in .NET, put it in production, customers are using it, and now you have promises to keep. Promises related to the API contract and behavior. A good test suite will help you keep those promises by protecting against regressions. It will allow you to quickly iterate, add new features and expand the API if it is resistant to refactoring and is giving fast feedback.

This session is about how to build such a test suite. We will discuss and showcase how to verify the API contract, the API’s behavior, and cross-cutting concerns like authentication and authorization. We will cover the pros/cons of various approaches regarding test runtime, coverage, and usage of test doubles vs. end-to-end testing using real data stores, among other things.

Are you writing valuable tests?

As a developer, have you ever struggled with a unit test suite that felt more like a burden than a benefit — filled with flaky tests, requiring constant maintenance, and slowing down your workflow? If so, you may not be writing valuable tests.

In this session, you will learn how to develop test suites that are genuinely valuable. We will start by exploring the core principles behind valuable tests — tests that:

- Are easy to maintain.
- Provide protection against regressions.
- Are resilient to refactoring of production code.
- Deliver fast feedback.

While these principles apply broadly across languages and frameworks, we will use C#, xUnit, and other tools in the .NET ecosystem to show how to apply them in real-world scenarios. You will see practical examples, patterns, and recipes that I use daily to write and maintain effective tests.

By the end of this talk, you will have the knowledge to choose effective testing patterns for your projects, ensuring your test suite adds real value, and a finely tuned bad-test smell-detector.

KCDC 2024 Sessionize Event

June 2024 Kansas City, Missouri, United States

Swetugg Stockholm 2024 Sessionize Event

February 2024 Stockholm, Sweden

.NET Conf 2023 Sessionize Event

November 2023

NDC Porto 2023 Sessionize Event

October 2023 Porto, Portugal

NDC London 2023 Sessionize Event

January 2023 London, United Kingdom

.NET Conf 2022 Sessionize Event

November 2022

NDC Oslo 2022 Sessionize Event

September 2022 Oslo, Norway

NDC Oslo 2021 Sessionize Event

November 2021 Oslo, Norway

.NET Conf 2021 Sessionize Event

November 2021

BlazorDay 2021 Sessionize Event

June 2021

Blazor Conf - Bhubaneswar Sessionize Event

June 2021

Egil Hansen

Distinguished Developer at Delegate, Microsoft MVP, creator of bUnit and AngleSharp.Diffing.

Reykjavík, Iceland

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top