Integration Testing with Spring
summary
Demonstrates practical recipes: uses Spring TestContext Framework with JUnit 5, shows repeated tests creating duplicate rows unless cleanup runs, and proves @Transactional rollback default is far faster than @DirtiesContext (constant per-test overhead). Reveals a pitfall where propagation REQUIRES_NEW commits and leaves a record, explains custom test execution listeners must use mergeMode=MERGE_WITH_DEFAULTS or lose essential listeners, and shows controller tests with mockMvc + @MockBean and reactive checks with WebTestClient.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 0:56Integration Testing
- 2:34Demonstration
- 6:18Dirtiest Context
- 8:16Transactional Execution
- 14:07Execution Time
- 22:10Execution listeners
- 22:52Test execution listener
- 31:10Testing on different profiles
- 34:39Testing Spring Rest
related talks
01h 26mTesting with Spring 4.x
44mTesting Web Apps with Spring Framework
56mLearning Spring Boot with TDD
45mSpring Boot Test - A look behind the curtain
51mTesting Spring Boot Applications
50mTesting with Spring and JUnit 5
33mThings I Wish I Knew When I Started Testing Spring Boot Applications
02h 43mSpring Boot testing: Zero to Hero
