Caching the Spring Context in Tests: How to Speed Up Testing
summary
The talk explains how to speed up Java/Spring test runs by reusing cached Spring ApplicationContexts during local development the same way CI/CD does, avoiding JVM shutdown between test runs. It describes using hotswap tools—DCEVM with HotSwapAgent—to allow code updates without restarting the cached JVM, and presents an IntelliJ IDEA plugin that implements this workflow plus guidance on writing HotSwapAgent plugins.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:50Test speed matters
- 3:37Spring context startup problem
- 7:11Caching Spring context
- 10:01DCEVM and HotSwap setup
- 14:38State update challenges
- 17:49Plugin architecture
- 18:53Live plugin demo
- 22:07MyBatis custom plugin
- 37:42Debugging demo issue
- 39:06Plugin-test sync
- 42:40Key takeaways
- 44:52Q&A
related talks
37mImproving Spring Boot test efficiency
36mImproving Spring Boot test efficiency
51mTesting Spring Boot Applications
41mIntegration Testing with Spring
42mTechniques for a faster JVM start-up
46mThe Hitchhiker’s guide to Java class reloading
45mCaching in Applications Still Matters
58mEnhancing Java Applications for the Cloud
