Getting maximum mileage from a minimal number of tests
summary
Shows how one automated end-to-end component test runs three executables in-memory so a single test covers the full happy path across API, event listener and outbox in ~1.6s. Uses Microsoft WebApplicationFactory, a testable Service Bus processor plus mocked senders, in-memory repos, and .NET’s FakeTimeProvider to advance clock and avoid long waits. Tests exercise Program.cs/startup and IoC, assert persisted domain events and outbox records, and can detect missing config or registration; example code is on the linked GitHub.
AI-written summary · about
chapters (22)
- 0:00End-to-end component testing intro
- 6:54What are component tests
- 8:00Component tests in testing
- 9:25Component vs unit tests
- 10:29Component test framework
- 12:17Readable component tests
- 15:05Shared test fixture
- 17:10Application host factories
- 20:29Mocking Azure Service Bus
- 24:42Asserting Service Bus handling
- 26:50Simulating message routing
- 28:32Testing HTTP calls
- 29:34Mocking database
- 30:58Fake time providers
- 33:44Testable phases
- 38:42Full end-to-end test
- 43:42Debugging component tests
- 49:58Detecting missing IoC
- 50:42Testing missing config
- 51:47Unhappy paths in tests
- 52:30Component testing pros/cons
- 53:55Conclusion & Q&A
related talks
44mTesting the untestable - patterns and use cases analysis
01h 02mTesting First - Getting The How
52mBuilding Operable Software with TDD (but not the way you think)
41mTesting .NET Web APIs from A to Z
27mTest Effective Development - End 2 (What) End?
56mBuilding Operable Software with TDD (but not the way you think)
40mInfinite improbability testing – execute all tests in parallel
34mEnd to end testing a world of web, mobile & desktop apps
