Warning
Reusable Containers is still an experimental feature and the behavior can change.
Those containers won't stop after all tests are finished.
The
Reusable
feature keeps the containers running and next executions with the same container configuration
will reuse it. To use it, start the container manually by calling
start()
method, do not call
stop()
method
directly or indirectly via
try-with-resources
or
JUnit integration
, and enable it manually through an
opt-in mechanism per environment. To reuse a container, the container configuration
must be the same
.
Reusable containers are not suited for CI usage and as an experimental feature
not all Testcontainers features are fully working (e.g., resource cleanup
or networking).
How to use it
Enable
Reusable Containers