Session

.NET Aspire as a Test Harness: From Local Development to CI

Your application depends on more than its own code. Databases, message brokers, external APIs, and similar dependencies must be available before you can test your application in full. Recreating that environment separately for local development, CI, and other testing contexts can be difficult, leading to brittle startup scripts and failures that are hard to reproduce. How nice would it be to have a single source of truth for setting everything up so that you can easily test your application?

In this session, I'll demonstrate how to use a .NET Aspire AppHost as a test harness. Using an application with a frontend, API, database, and external service, we will launch the system, execute tests, and tear it down again. You'll learn what I found valuable and where using Aspire as a test harness works best. You'll also learn about the drawbacks and things to avoid. The demos include scenarios showcasing BDD, observability, debugging, database management, playwright, pipeline integration, and how AI can hook into this setup.

You will leave with a practical example of how to either reuse your Aspire AppHost or build a new one for use across development and testing. The example uses several tools, including xUnit, Reqnroll, Playwright, and, of course, Aspire. After the talk, the code will be available!


.NET developers who build applications with external dependencies and want a consistent approach to full-stack testing across local development and CI. Basic familiarity with .NET Aspire and automated testing is helpful but not required.

Jos Hendriks

Helping teams build quality software and simplifying complexity | Lead developer | Technical coach | Software architect

's-Hertogenbosch, The Netherlands

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