Speaker

Egil Hansen

Egil Hansen

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

Reykjavík, Iceland

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.

The Time Traveller's Guide to .NET 8: Are you doing it right?

Are you using DateTime, DateTimeOffset, or timers in your code? Then you should be using the TimeProvider API introduced with .NET 8 going forward, even if you are still programming in earlier versions of .NET.

This talk will:

• Teach how to use the TimeProvider API and other time-based APIs in .NET that support it. It is not just about “UtcNow”, there is support for timers, time stamps, time zones, and other time-based APIs like Task.Delay that supports it.

• Dive into the design of TimeProvider API and cover the interesting and controversial choices that were made, e.g., why does it seemingly break with the “single responsibility principle” and other SOLID principles.

• Show how to control the progress of time deterministically during testing. Hint, you probably do not want to use a mocking library with TimeProvider.

• Discuss good practices and pitfalls when using a TimeProvider in both production- and test code.

.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

Egil Hansen

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

Reykjavík, Iceland

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