Caching Spring context in tests: how to speed up testing process – Ilia Chernov, Wrike

preview_player
Показать описание
In Wrike, we have a few big spring contexts that are used in tests and managed by custom code. These big contexts are great in CI/CD because they allow you to save time by caching them. But in local development, it's nothing but frustration because of how much time it takes to initialize a context to run a bunch of tests. Can we somehow eliminate this context initialization process and save our time and focus?

If you think about it, we can also reuse the Spring context in local development. The context itself does not change much during development, so you can cache the spring context in some way after test execution, do not shut down the JVM after test execution, and run the next tests in the same JVM with cached context. Okay, now you can rerun tests ignoring the Spring initialization step, but how do we update our code? With the help of the hotswap feature!

In this talk, Ilya will introduce the IntelliJ IDEA plugin that allows you to do all this with DCEVM and save a ton of time. Also will demonstrate how you can write custom plugins for HotSwapAgent and why you may want to do so.

Also, support for JUnit and Kotlin was added.
Happy testing!

Рекомендации по теме
welcome to shbcf.ru