~/talk

The Art of (Backend) Component Testing

Talkat TestCon Europe 2021 · 2021-09-07..09-09· [testing, microservices]
slides:none on file

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

  1. 0:00Backend component testing intro
  2. 3:19Developer vs production testing
  3. 6:53Why component tests balance
  4. 9:05Component test example
  5. 14:44Challenges in component tests
  6. 17:08Optimizing Docker Compose
  7. 21:02Best practices for infrastructure
  8. 22:33Shared database state handling
  9. 26:48Cleaning test data
  10. 33:30Over-deletion detection
  11. 37:45Five areas to cover
  12. 39:28Balancing realism and DX
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.