Session
Level Up Your DevEx: Unit Test Complex E2E Flows + Integration Testing with Aspire & OTEL
This session is in two parts:
1) How to get the maximum mileage from a minimal number of tests - end-to-end component tests
2) Using .Net Aspire for next level devex and easy integration tests asserting against OTEL trace data
Part 1 Introduces, explains and demonstrates an approach to automated testing which covers as much of the surface area of your codebase as possible.
Imagine a unit test where the 'unit' is actually multiple executables! A single test can cover the whole happy path flow of a complex piece of orchestration, from API handlers, service bus handlers, database calls etc all in-memory, fast and with a nice fluent developer experience!
Because everything including the Program.cs and startup code are covered we can spot configuration and IoC issues which are hard to test with more traditional methods. I include a method of mocking and asserting against Azure Service Bus
Part 2 discusses the usual issues with integration tests and how they expose the issues with running an app locally. It then presents .Net Aspire as the answer to lots of these issues, It covers the process of adding .Net Aspire to a solution and showcases its features, adding additional OTEL telemetry to track interesting events, including persisting and rehydrating telemetry across any 'process airgaps' and the creation of integration tests covering end-to-end flows using Open Telemetry trace data for assertions.
The aim of both parts of this talk is to have a repo which when pulled down onto a fresh machine, builds first time, component tests pass first time, then having run the script and the app, the the integration tests pass first time, after which you can push F5 and have it all run with almost no time or effort!

Andrew Poole
Senior Backend Engineer @ Flagstone, ex-ClearBank, speaker, musician
Street, United Kingdom
Links
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