Unit Test Complex E2E Flows + Integration Integration Testing with Aspire & OTEL


Details
After a longer-than-planned summer break, we're back!!! With special thanks to IO Associates, who will be hosting us and providing refreshments, we have an excellent talk in 2 parts from Andrew Poole.
- How to get the maximum mileage from a minimal number of tests - end-to-end component tests
- 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 has been writing code for a living since 2005, most recently as a Senior Backend Engineer at Flagstone, and ClearBank before that. He loves solving problems, design and architecture, communicating ideas and the incredible creativity of software engineering. He’s interested in event sourcing, immutable architecture and distributed systems. He also enjoy mentoring others and building great team culture.
Please ensure you turn up in plenty of time for the start. Refreshments will be provided.

Sponsors
Unit Test Complex E2E Flows + Integration Integration Testing with Aspire & OTEL