Spring Boot Test - A look behind the curtain
summary
Shows why @SpringBootTest boots "95% of the app" (web server mocked) and when to prefer slices like @WebMvcTest; builds a reusable JUnit extension called demo Spring extension that moves application-context creation into a test context manager and then into a bootstrapper plus cached test context, adds test execution listeners for autowiring and transactions, and demonstrates Mockito, JUnit, AssertJ and TestNG interoperability. Prototype compiles and runs; caching cuts repeated 3s startup examples and prevents redundant context creation.
AI-written summary · about
chapters (14)
- 0:00Start
- 0:15Introduction
- 1:00Testing purpose and goals
- 2:49Unit testing basics
- 6:00Pure unit testing limits
- 11:40Integration tests from scratch
- 15:18Reusable JUnit extension
- 19:57Test context manager abstraction
- 23:28Caching app contexts
- 28:07Test execution listeners
- 36:01Integration testing trade-offs
- 38:26Spring Boot testing abstractions
- 41:01Slice testing strategies
- 44:14Summary
related talks
02h 43mSpring Boot testing: Zero to Hero
48mTesting Spring Boot Applications Demystified
33mThings I Wish I Knew When I Started Testing Spring Boot Applications
01h 49mSpring Boot testing: Zero to Hero
51mTesting Spring Boot Applications
53mTesting Spring Boot Applications Demystified
44mThings I Wish I Knew When I Started Testing Spring Boot Applications
43mInside Spring: The Architecture Behind the Framework
