Learnings From Netflix To Effective Testing With Spring Boot
summary
Unit tests that only mock Spring annotations miss framework wiring and schema mismatches, while full startup smoke tests catch DI and schema errors but cost 10–30+ seconds. The recommended middle ground boots only listed components with @SpringBootTest with classes and reusable DGS test slice, mocks for slow externals like OpenAI, and real databases via Testcontainers Cloud. Netflix targets 95% of tests as fast slice-based integration tests, one HTTP smoke test, and selective unit tests.
AI-written summary · about
