Build & DeployBuild & Deploy
Conference40min
INTERMEDIATE

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 Chernov
Sergei ChernovMiro

talkDetail.whenAndWhere

Saturday, November 8, 15:20-16:00
Room 3 - Alexandros
talks.roomOccupancytalks.noOccupancyInfo
talks.description
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.
optimization
memory
test
spring
talks.speakers
Sergei Chernov

Sergei Chernov

Miro

Netherlands

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

talkDetail.rateThisTalk

talkDetail.poortalkDetail.excellent

talkDetail.ratingNotYetAvailable

talkDetail.ratingAvailableWhenStarted

talkDetail.signInRequired

talkDetail.signInToRateDescription

occupancy.title

occupancy.votingNotYetAvailable

occupancy.votingAvailableBeforeStart

talkDetail.signInRequired

occupancy.signInToVoteDescription

comments.title

comments.speakerNotEnabledComments