Skip to content
Home › SQL Tools › Database Testing & Test Data › Testcontainers
Tool Review · Database Testing & Test Data

Testcontainers

Testcontainers is a family of open source libraries, now owned by Docker after its December 2023 AtomicJar acquisition, that start throwaway database and service containers from test code in Java, Go, .NET, Node.js, Python, Rust and other languages.

Free Research-based review
Last verified November 2026. Version checked: Testcontainers for Java 2.0.5 (latest GitHub release on 7 November 2026). Features and pricing for commercial products change; check the vendor site for the latest details.
Product status: Docker, Inc. acquired AtomicJar, the company behind Testcontainers and Testcontainers Cloud, on 11 December 2023; the libraries remain open source. Testcontainers for Java 2.0.0 removed JUnit 4 support.
Vendor
Docker, Inc. (open source project; acquired AtomicJar in December 2023)
Price
Free
Platforms
Linux, macOS, Windows, CI runners with a Docker-compatible runtime, Testcontainers Cloud (SaaS)
Licence
Open source libraries (Testcontainers for Java: MIT); Testcontainers Cloud is a commercial Docker service
Product type
Open source libraries (Java library is MIT)
Official site
Works with
PostgreSQLMySQLMariaDBSQL ServerOracleDb2MongoDBRedisCassandraClickHouseCockroachDBNeo4jElasticsearchAny database with a container image

At a glance

Supported databasesRelational and NoSQL modules (PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, Redis and more); any image via generic containers
Data generationNone; load data with migrations, init scripts or tools such as DbUnit
MaskingNot applicable
Referential integrityNot applicable (provides the database, not data)
CI/CD integrationRuns in any CI with a Docker-compatible runtime, or via Testcontainers Cloud agent
Test automationIntegration tests in the language test framework you already use
Data volume or subsettingNot applicable
DeploymentLibraries in your test code; local Docker or Testcontainers Cloud
LicensingOpen source libraries (Java: MIT); Testcontainers Cloud included minutes in paid Docker plans
Short answer

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.

How we know: This profile is research-based: languages, modules, runtime support and pricing were checked on 7 November 2026 against testcontainers.com (home, modules and Cloud pages), the Testcontainers for Java documentation, GitHub releases and LICENSE file, Docker's press release on the AtomicJar acquisition and Docker's pricing page. We have not run Testcontainers.

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

JUnit JupiterSpockDocker Desktop and Docker EngineTestcontainers CloudPodman, Colima and Rancher Desktop (with configuration)Flyway and LiquibaseGitHub Actions and other CI services

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

Our take

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

Checked November 2026.

Listed in: Database Testing & Test Data.

How we research reviews and what star ratings mean: our editorial method.

Compare your options

Browse the full tools directory or see the head to head comparisons.