~/talk

Curse of Spring Boot Test

Talkat Java Day Minsk 2017 · on Saturday, 2017-06-03· [java, testing]
slides:none on file

Shows that using Spring Boot test annotations often does more than expected: SpringBootTest loads entire application context and that makes tests slow and unpredictable; the context cache is fragile and gets invalidated by different annotation combinations, profiles or property orders. Demonstrates fixes used in live code: narrow @SpringBootTest with explicit configuration, add a @TestConfiguration stop to prevent upward scanning, prefer DataJpaTest/WebMvcTest for slices, and use context hierarchies to reuse one cached context; also warns about duplicate beans caused by naming mismatches.

AI-written summary · about

  1. 0:00Introduction
  2. 1:51Test types overview
  3. 3:21Demo setup
  4. 5:32Unit test basics
  5. 8:51Component test introduction
  6. 10:15Spring context configuration
  7. 12:06Testing expert resolvers
  8. 13:10Handling multiple experts
  9. 17:51Spring Boot Test setup
  10. 18:12Context caching concerns
  11. 24:25Context hierarchy benefits
  12. 28:42Cache invalidation issues
  13. 31:03Spring vs Spring Boot Test
  14. 33:23Cache validation demo
  15. 36:53Cache reset techniques
  16. 37:15Testing cache service
  17. 41:07Bean naming conflicts
  18. 42:54Spring Boot Test scanning
  19. 46:28Fixing scanning issues
  20. 47:50Stop configuration solution
  21. 48:13Data JPA and Web MVC tests
  22. 50:45Mocking in tests
  23. 53:17Summary and best practices
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.