Session
How to fall in love with automated tests!
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) Integration Tests - how to not hate them and also sort out your local dev experience!
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 shows some strategies for fixing some of those issues and actually making integration tests useful, mainly leaving the thing you are testing in a running state on your machine. This is a achieved by means of a script to set up local configuration without having to remember not to check env secrets into appsettings.dev files. Also using Fixtures which do things like setting up queues, topics and subscriptions.
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!
This talk is two shorter talks in one. There will be slides, code and demos.

Andrew Poole
Senior Backend Engineer @ Flagstone, ex-ClearBank
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