August 26–28, 2024

Learnings from Netflix to Effective Testing with Spring Boot

Just relying on mocks truly is often not the most efficient way to test code. Should data access code mock out the database? Should a GraphQL or REST service just test its data fetchers as Java methods? You will not only learn why the answer to these questions is often “no”, but you will learn the techniques to best test such code. You will learn about Spring’s testing features such as @SpringBootTest with all its options, and how to best structure tests and leverage test slices for fast test execution. You’ll also learn about many common testing use cases, such as testing with databases using Testcontainers, testing Spring libraries, WebMVC, GraphQL and more. At Netflix, we have many large and complex Spring Boot applications. This talk presents the learnings from writing tests for these applications, and optimizing slow tests.

Paul Bakker

Staff Engineer
Netflix