The Art of (Backend) Component Testing
summary
Argues that the best balance is component tests that run the entire microservice plus infra (not full E2E or tiny units) and shows concrete tactics: use docker compose startup in-test hook or Testcontainers so CI and dev machines boot infra automatically, tune Postgres flags and tmpfs to cut I/O and shave ~10–20%, and keep services up so repeated runs go from minutes on first pull to milliseconds thereafter. Measures ~800ms cost for per-test cleanup, warns about multi-process teardown, and shows adding timestamps to unique keys as a practical fix.
AI-written summary · about
chapters (12)
- 0:00Backend component testing intro
- 3:19Developer vs production testing
- 6:53Why component tests balance
- 9:05Component test example
- 14:44Challenges in component tests
- 17:08Optimizing Docker Compose
- 21:02Best practices for infrastructure
- 22:33Shared database state handling
- 26:48Cleaning test data
- 33:30Over-deletion detection
- 37:45Five areas to cover
- 39:28Balancing realism and DX
related talks
45mBuilding a successful test automation architecture in a microservices environment
35mTesting in Frontend World
57mAdvanced Testing Techniques: Tips from the trenches
37mUnderstanding the successes and the pain points of different testing strategies
20mThe Art of Testing
44mTesting: Integration Tests - The good, bad and ugly
49mThey say testing triangle but you are doing microservices. Now what?
40mWhy component level performance testing should always be part of CD and CI
