At a glance
| Supported databases | Relational and NoSQL modules (PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, Redis and more); any image via generic containers |
| Data generation | None; load data with migrations, init scripts or tools such as DbUnit |
| Masking | Not applicable |
| Referential integrity | Not applicable (provides the database, not data) |
| CI/CD integration | Runs in any CI with a Docker-compatible runtime, or via Testcontainers Cloud agent |
| Test automation | Integration tests in the language test framework you already use |
| Data volume or subsetting | Not applicable |
| Deployment | Libraries in your test code; local Docker or Testcontainers Cloud |
| Licensing | Open source libraries (Java: MIT); Testcontainers Cloud included minutes in paid Docker plans |
Testcontainers suits development teams that want integration tests against the same database engine they run in production rather than an in-memory substitute. Test code declares a container, the library starts it, passes the connection details and removes it afterwards. The libraries are free; you need Docker or another compatible runtime in CI, or a paid Testcontainers Cloud allowance from a Docker subscription.
Overview
Testcontainers is an open source project with implementations for 13 languages listed on its site: Java, Go, .NET, Node.js, Python, Rust, Ruby, PHP, Haskell, Clojure, Elixir, Scala and a native variant. Each library talks to a Docker-compatible API to start containers defined in test code, waits until they are ready and cleans them up when tests finish. More than 50 modules wrap common services, including relational databases (PostgreSQL, MySQL, MariaDB, SQL Server, Oracle Free, Db2, ClickHouse, CockroachDB and others) and NoSQL stores (MongoDB, Redis, Cassandra, Couchbase, Neo4j, Elasticsearch and others); module coverage differs by language.
Docker, Inc. acquired AtomicJar, the company founded by the Testcontainers maintainers, in December 2023, and now sells Testcontainers Cloud as part of its subscriptions. Testcontainers Cloud runs the containers on remote infrastructure, through a desktop app for laptops or a non-privileged agent in CI, so tests can run without a local Docker daemon. The Java documentation states it is actively tested against Docker Engine on Linux and Docker Desktop; Podman, Colima and Rancher Desktop work with extra configuration but are not actively tested.
Key features
- Libraries for 13 languages, including Java, Go, .NET, Node.js, Python and Rust
- More than 50 modules for databases, message brokers, search engines and other services
- Database modules that start a real engine and hand the connection details to the test
- Automatic container cleanup after tests
- Test framework integrations for Java (JUnit Jupiter and Spock); JUnit 4 support was removed in Testcontainers for Java 2.0.0
- Testcontainers Cloud for running containers remotely from laptops and CI (paid, via Docker subscriptions)
- Works with any image, so custom or older database versions can be pinned per test suite
Integrations and ecosystem
Pros and cons
Pros
- Tests run against the real database engine and version, not an emulation
- Free libraries across many languages
- Large module catalogue covering most popular databases
- Containers are created and removed per run, so tests start from a clean state
Cons
- Needs Docker or a compatible runtime on every developer machine and CI runner, or a paid Cloud allowance
- Alternative runtimes such as Podman and Colima need extra configuration and are not actively tested
- Module coverage and features differ between language implementations
- Testcontainers for Java 2.0 removed JUnit 4 support, so older suites need migrating before upgrading
Pricing
The Testcontainers libraries are free and open source and can be used at no cost; you need a Docker-compatible container runtime where tests run. Testcontainers Cloud, which runs the containers remotely for laptops and CI, is a paid Docker service: Docker's pricing page lists 100 included runtime minutes per month on Pro ($11 per user per month monthly, $9 annual), 500 on Team ($16 monthly, $15 annual) and 1,500 on Business ($24 per user per month), with options to buy more and a free trial on the Personal plan. Prices in US dollars as shown on 7 November 2026.
Pricing checked on the vendor's official page on 7 November 2026. Prices change; confirm before buying.
Who it is best for
Application developers who want reliable integration tests against real PostgreSQL, MySQL, SQL Server, MongoDB or other services in local runs and CI.
Typical use cases
- Running repository and ORM tests against the exact PostgreSQL or MySQL version used in production
- Testing database migrations (Flyway, Liquibase) on a fresh database in every CI run
- Integration tests that need a database plus Kafka, Redis or Elasticsearch together
- Reproducing a bug on an older engine version by pinning the container image
Who should look elsewhere
- Testing stored procedures in SQL inside the database, where tSQLt or pgTAP fit better (they can run inside a Testcontainers database).
- Environments where containers cannot run and a Docker subscription is not an option.
Verdict
Testcontainers is the common choice for integration testing against real databases from application code, free to use and supported by Docker since the 2023 AtomicJar acquisition. Budget for a container runtime in CI (or Testcontainers Cloud minutes), and pair it with a fixture tool such as DbUnit or your migrations when tests need known data.
Frequently asked questions
Is Testcontainers free?
The libraries are free and open source (Testcontainers for Java is MIT licensed). Testcontainers Cloud, which runs containers remotely, is a paid Docker service with monthly runtime minutes included in Pro, Team and Business plans.
Who owns Testcontainers?
Docker, Inc. announced on 11 December 2023 that it had acquired AtomicJar, the company behind Testcontainers and Testcontainers Cloud. The libraries continue as open source projects.
Which databases does Testcontainers support?
The module catalogue lists relational modules such as PostgreSQL, MySQL, MariaDB, SQL Server, Oracle Free, Db2, ClickHouse and CockroachDB, and NoSQL modules such as MongoDB, Redis, Cassandra, Couchbase and Neo4j. Availability differs by language, and any database with a container image can run as a generic container.
Does Testcontainers work without Docker Desktop?
Yes. It needs a Docker-API compatible runtime: Docker Engine on Linux, Docker Desktop, Testcontainers Cloud, or alternatives such as Podman, Colima and Rancher Desktop with extra configuration.
Sources
- Testcontainers home
- Testcontainers modules catalogue
- Testcontainers Cloud
- Testcontainers for Java: supported container runtimes
- Testcontainers for Java releases
- Docker press release: acquisition of AtomicJar
- Docker pricing (Testcontainers Cloud minutes)
Checked November 2026.
Listed in: Database Testing & Test Data.
How we research reviews and what star ratings mean: our editorial method.