Testcontainers for Java
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
What Testcontainers for Java is
Testcontainers for Java is a Java library for JUnit tests that starts throwaway Docker containers for databases, Selenium browsers or any other image. It requires Docker. It works with JUnit 4, JUnit 5 (Jupiter) and Spock, and containers can also be managed manually. Documented uses include data access tests against MySQL, PostgreSQL or Oracle containers. Application integration tests can run alongside containerized databases and message queues. UI tests can get a fresh Selenium-compatible browser container per test. Custom container classes can be built on GenericContainer.
Written from the project's README, read , and its documentation (see sources).
- Category
- Test data and mocking
- License
- MIT
- Language
- Java
- Changelog
- Releases on GitHub
Repository metrics
Status
activeLast commit within 90 days of the fetch date.Computed from the last commit date and the archive flag on the fetch date. See the status rules.
Alternatives
Listed test data and mocking tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from Testcontainers for Java's, with its source.
Mockito: Definition format: Code (Java API: mock(), when(), verify(); @Mock, @Spy and @InjectMocks annotations). source: Docs: Mockito site
Karate: Languages for writing tests: Karate DSL with Gherkin-based syntax. source: Docs: Why Karate?
WireMock: Languages for writing tests: Java and JVM; community solutions for Python, Node.js, .NET, Go, Rust, Kotlin, Groovy and others. source: Docs: WireMock Java
MockServer: Languages for writing tests: Clients for Java, JavaScript/Node, Python, Ruby, Go, PHP, .NET and Rust. source: README
Microcks: Languages for writing tests: Java, NodeJS/TypeScript, Go and .NET through Testcontainers modules. source: Docs: Testcontainers Modules
Datafaker: Languages for writing tests: Java and Kotlin. source: Docs: Getting started
JSON Server: Definition format: JSON or JSON5 data file (db.json or db.json5). source: README
Faker: Languages for writing tests: Python (3.8 and above). source: README
Questions
Is Testcontainers for Java open source?
Yes. Testcontainers for Java is released under MIT, an OSI-approved license, as reported by the GitHub API on 2026-09-22.
Is Testcontainers for Java maintained?
On 2026-09-22, the last commit to the default branch was on 2026-09-09, so the listed status is active. Rule: Last commit within 90 days of the fetch date.
How many GitHub stars does Testcontainers for Java have?
8,741 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.
What language is Testcontainers for Java written in?
The repository's primary language, as reported by the GitHub API, is Java.
Sources
- GitHub REST API: repository, read
- GitHub REST API: commits, read
- GitHub REST API: latest release, read
- GitHub REST API: contributors, read
- README, read
- Testcontainers for Java documentation, read