Hi ,
Posting with mod approval from Manning. We’ve just released a new book focused entirely on something most Spring Boot teams struggle with at some point: tests that start out helpful but slowly become a drag on development.
Testing Spring Boot Applications by Daniel Garnier-Moiroux
If you’ve worked with SpringBootTest, MockMvc, or SpringExtension, You already know how powerful the testing tools are, and how easy it is to end up with slow builds, brittle tests, or setups that nobody wants to touch.
This book is written by a member of the Spring team, and it spends a lot of time on the why behind the tooling. Not just how to write a test, but what’s actually happening when the context loads, how slices work, when to use full integration tests, and when not to.
It also goes into things that tend to get messy in real projects:
-
keeping tests fast as the app grows
-
dealing with changing dependencies and configs
-
structuring tests so failures actually tell you something useful
-
testing across layers, from configuration and binding all the way up to API and browser-level checks
The examples build up from simple cases to a more complex application, so you can see how the testing approach evolves as things get less trivial.
If your test suite feels slow, flaky, or just hard to reason about, this one is very much aimed at that situation.
For the community, you can use MLGARNIERMOIROUX50RE for 50% off.
Happy to bring the author to answer questions about the book. Also, I'm curious how people here are structuring their tests these days. Are you leaning more on slice tests, full context tests, or something custom in between?
Let us know in the comments.
Thanks for having us here.
Cheers,
Stjepan
Manning Publications