testcontainers /testcontainers-java
Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
★ 8,765⑂ 1,953👁 127⑃ 9,414● 2,471▤ 92
+1
日增长
8,765
stars
1,953
forks
127
watchers
9,414
prs
2,471
issues
92
releases
README
Testcontainers !Maven Central Version Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container. !Testcontainers logo Read the documentation here License See LICENSE. Copyright Copyright (c) 2015 - 2021 Richard North and other authors. MS SQL Server module is (c) 2017 - 2021 G DATA Software AG and other authors. Hashicorp Vault module is (c) 2017 - 2021 Capital One Services, LLC and other authors. See contributors for all contributors.
Top issues
#2290Spring Boot Tests with JUnit5 Jupiter and Shared Containers47 comments · 2020-01-26#1495Support parallel JUnit 5 tests43 comments · 2019-05-22#1454Exception NoClassDefFoundError org/testcontainers/utility/PathUtils34 comments · 2019-05-08#1816KafkaContainer transactions: Timeout expired while initializing transactional state in 60000ms.32 comments · 2019-08-30#87Allow better support for test frameworks other than JUnit31 comments · 2016-03-14#5837[Enhancement]: Support different docker context26 comments · 2022-09-12#1000Allow for graceful container stop25 comments · 2018-11-29#581Codeship builds fail: `can not connect to Ryuk`25 comments · 2018-02-10
Discussions
#12143Wait.forHealthCheck timout, but docker ps says "healthy"?! 🤔3 comments · 2026-10-28#12134Are there any plan for 2.0.6? (docker-java-transport-zerodep related pain)0 comments · 2026-10-26#12132Optional structured diagnostics when a container fails to start0 comments · 2026-10-25#12122MountableFile directory copy uses a symlink target path as its TAR entry name1 comments · 2026-10-18#12085Can "unknown blob" errors be caused by testcontainers?1 comments · 2026-09-17#12075Using Testcontainers for a maintained database compatibility matrix in an older Java project0 comments · 2026-09-12#11975Recommended way to reset PostgreSQL state between test classes with a shared static container1 comments · 2026-08-21#11942[Enhancement]: Clarify ComposeContainer constructor javadocs0 comments · 2026-07-23
Latest release
2.0.5 2.0.5 2026-04-20What's Changed 🚀 Features & Enhancements Support apache/artemis in ArtemisContainer (11590) @eddumelendez Add getHttpPort and getGrpcPort methods in WeaviateContainer (11712) @eddumelendez Add support for !override docker compose tag (11490) @meck-gd 🐛 Bug Fixes Fix jarFileTest cache relocatability (11574) @ribafish 📖 Documentation Update LocalStack docs (11581) @eddumelendez 🧹 Housekeeping Fix typo in GenericContainer namespace validation error message (11717) @haider2122 Replace deprecated/removed method calls javadoc examples (11570) @ratonalgaze Use