Async Lifetime Tests with xUnit and AutoFixture
summary
A presentation about testing a basic CQS-pattern service that handles command requests and publishes events describing state transitions, focusing on common testing strategies and their pros/cons. It demonstrates using AutoFixture to simplify tests by injecting parameters into test methods, discusses problems with initialization and cleanup in async tests, and shows a lightweight integration between xUnit and AutoFixture to handle those async lifetime issues.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:54Async test problems
- 6:09Demo service architecture
- 13:50Service structure and commands
- 15:20Traditional xUnit tests
- 21:26Bulky tests and setup
- 23:33AutoFixture for simpler tests
- 28:42Async init in AutoFixture
- 29:51Custom async context
- 33:30AutoFixture with custom context
- 38:19Readable tests with attributes
- 43:59Test building blocks
- 45:38Testing conflicts and parallelism
- 51:27Approach limits
- 52:11Q&A








