~/talk

Spring Boot testing: Zero to Hero

Talkat Devoxx UK 2025 · 2025-05-07..05-09· [spring, testing]
slides:none on file

Starts from the problem that @SpringBootTest is easy to overuse — tests balloon to 12 minutes and fail randomly — then shows concrete fixes: replace blanket @SpringBootTest with MockMvcTester for API checks, use HtmlUnit-backed WebClient for lightweight browser tests, run a real server with webEnvironment=RANDOM_PORT for session/servlet features, apply Spring Boot test slices to shrink contexts, and integrate Testcontainers for real databases; demos include AssertJ assertions, CSRF-enabled security tests, and context caching to cut repeated startup costs.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:07Disclaimers and talk overview
  3. 3:15Web testing with Mock MVC
  4. 15:49Browser testing with WebClient
  5. 24:21Real web server vs mock stack
  6. 35:45Test context caching
  7. 48:04Toolbox: AssertJ and Output Capture
  8. 1:00:11Test slices for focused testing
  9. 1:12:11Test containers for databases
  10. 1:30:57Security testing with Spring Security
  11. 1:47:16Wrap-up and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.