One Full-Path E2E Run: 20 Symptoms, 5 Root Causes, All Missed by Unit Tests
Unit tests can't catch defects that live in the seams between modules; this setup does, and then converts each discovery into a regression test so the CI stops the recurrence. The cost is slower full runs via workers:1, which the author argues is the right trade for a self-hosted platform.
Full-path e2e testing fills the gap unit tests leave open: each module works, but assembled behavior breaks. One run against Alioth's platform surfaced twenty UI anomalies. Debugging collapsed them to five root causes, from a target-group update that dropped new targets to a missing retry on K8s 409 conflicts. None was a wrong function; each was two correctly written modules operating on mismatched assumptions.
The post spells out the enabling mechanics. Login is bypassed by locally minting a JWT and injecting it with Playwright's storageState, with the caveat that login-specific flows need separate real-login tests. Test data is created and deleted via API, never by clicking the UI, and workers is set to 1 so the shared database stays consistent. Fixes were ordered by data semantics first, then concurrency, then default-value timing, and each root cause got a millisecond-scale unit test at the data layer. E2E finds, unit tests lock.
Practical pitfalls round it out: keep traces on failure, set retries to zero so flakiness becomes a red signal instead of being hidden, use the system Chrome, and keep expect timeouts shorter than API timeouts. Cleanup failures must be logged, or leftover data surfaces as unrelated test failures next run.
The classification of all five root causes as mismatched assumptions rather than code errors suggests integration testing's primary value is exposing contract boundaries, not finding individual bugs.
Fixing data semantics before UI is a deliberate ordering: because UI is just a projection of backend behavior, addressing the root layer first makes later UI fixes explainable and avoids false starts.
The decision to keep retries at zero is a strong stance: flakiness is treated as a real defect rather than something to tolerate, which forces the team to address timing and race conditions instead of masking them.
Using unit tests at the data layer to lock fixes, rather than more e2e, trades a 10-second test for a millisecond one, making regression detection fast enough to run on every edge case.