The AtomicJar team
Testcontainers Desktop

Freeze containers to prevent their shutdown while you debug

AUTHOR: The AtomicJar team

Are your automated tests running so fast that you don't have time to inspect the containers? Are you running tests from outside your IDE, or don't want to figure out where to set a breakpoint? With Testcontainers Desktop, you can now "freeze" containers to prevent their shutdown so that you can debug them.

After enabling "Freeze containers shutdown", simply run your test as usual, and the app will prevent its shutdown, effectively keeping the test running indefinitely. Once you're done with your investigation, uncheck the "freeze" button to resume normal test execution, including clean-up.

While, you don't need to debug via a fixed port, both features are particularly useful in combination to easily connect a debugging tool and have time to use it. Freezing containers works with either your local runtime or Testcontainers Cloud.

Please note that the feature is in beta and currently only supports containers with a managed lifecycle (e.g. @Container annotation, inside a try-with-resources block). In particular, the feature is not yet designed to freeze long-lived containers (e.g. singleton pattern and reusable containers).

Powered by LaunchNotes