Improving Spring Boot test efficiency
summary
Company with a 2M‑line monolith and 200 microservices faces thousands of integration tests that cause OOMs and CI overload; applying test reordering based on merged context configuration, eager context closing when a config’s last test runs, smaller context cache sizes, lazy-start Testcontainers and a singleton container pattern cuts active Docker containers drastically and halves some module builds (example: 6 min → 3 min, ~30%); library repo: github.com/seregamorph/spring-test-smart-context and slides linked.
AI-written summary · about
chapters (15)
- 0:00Optimizing Spring Boot tests
- 3:55Test performance issues
- 10:00Spring test context caching
- 12:33Unique test configurations
- 15:45Docker containers reuse
- 17:13Lazy DB initialization
- 19:03Dynamic ports for parallelism
- 20:52Test config pitfalls
- 23:26Context lifecycle automation
- 27:46Test execution reordering
- 28:49Optimization impact
- 31:23Optimization library
- 34:15Future test framework
- 35:38Large-scale test factors
- 36:44Conclusion
related talks
51mTesting Spring Boot Applications
47mScaling Integration Tests: Parallel Spring Tests with JUnit & Testcontainers
49mHow fixing a broken window cut down our build time by 50%
53mTesting Spring Boot Applications Demystified
02h 43mSpring Boot testing: Zero to Hero
33mThings I Wish I Knew When I Started Testing Spring Boot Applications
45mSpring Boot Test - A look behind the curtain
41mIntegration Testing with Spring
