
Conference40min
Improving Spring Boot test efficiency
This session explores optimizing Spring Integration Test Framework by improving context caching and management to prevent memory and performance issues in large test suites. Techniques include test reordering and smarter context closing, with a proposed solution available on GitHub and positively received by the Spring Core team.

Sergei ChernovMiro
talkDetail.whenAndWhere
Saturday, November 8, 15:20-16:00
Room 3 - Alexandros
talks.roomOccupancytalks.noOccupancyInfo
In this session we'll talk about how Spring Integration Test Framework works under the hood, how the contexts are cached and reused in subsequent tests. The existing solution can be quite convenient, efficient and flexible, but on a large scale with lots of modules, tests and heavy-weight beans like TestContainers-handled docker containers suite executions may lead to OOM failures and take too much time.
To address these problems we'll first consider practical steps like trivial ones and then do few tricks like test reordering and smart context closing logic.
Overall these optimizations can have significant optimization effect - both for memory and execution time, also better stability.
There is a project with the solution https://github.com/seregamorph/spring-test-smart-context - here you can find more details.
This idea was submitted to Spring Core team https://github.com/spring-projects/spring-framework/issues/32289 and accepted to the backlog, the initial feedback is quite positive.
To address these problems we'll first consider practical steps like trivial ones and then do few tricks like test reordering and smart context closing logic.
Overall these optimizations can have significant optimization effect - both for memory and execution time, also better stability.
There is a project with the solution https://github.com/seregamorph/spring-test-smart-context - here you can find more details.
This idea was submitted to Spring Core team https://github.com/spring-projects/spring-framework/issues/32289 and accepted to the backlog, the initial feedback is quite positive.

Sergei Chernov
Sergei is a seasoned Java engineer and Open Source volunteer. Last years mainly focused on Developer Productivity Engineering and build tooling.
Also he is an author of programming-related articles and a regular conference speaker.
Portfolio: https://github.com/seregamorph
Also he is an author of programming-related articles and a regular conference speaker.
Portfolio: https://github.com/seregamorph
talkDetail.shareFeedback
talkDetail.feedbackNotYetAvailable
talkDetail.feedbackAvailableAfterStart
talkDetail.signInRequired
talkDetail.signInToFeedbackDescription
occupancy.title
occupancy.votingNotYetAvailable
occupancy.votingAvailableBeforeStart
talkDetail.signInRequired
occupancy.signInToVoteDescription
comments.speakerNotEnabledComments