CheckOps home

Tools directory

D

CheckOps

dockertest

dockertest is an Apache-2.0 Go library from Ory that starts Docker containers for integration tests against real databases and services, and cleans them up afterwards.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

Dockertest lets Go tests run against third-party services in Docker. The README explains the motivation: mocking databases is strenuous, schema changes force mock rewrites, and it is smarter to test against a real database that is destroyed after testing.

Tests start a container from any Docker Hub or custom image, wait until the service is ready using a retry helper, connect to it, run the test and purge the container. It works with databases such as PostgreSQL and MySQL, and any service available as an image.

Dockertest is maintained by Ory and released v4.0.1 in October 2026.

In the quality loop it supports integration tests in Go with real dependencies.

The source code is at ory/dockertest on GitHub under the Apache-2.0 licence, with about 4,500 stars; the most recent commit was on 19 October 2026.

Features

  1. Any Docker image: Run real services for tests.
  2. Readiness retry: Wait until a service accepts connections.
  3. Cleanup: Purge containers after tests.
  4. Go native: Use with the standard testing package.
  5. CI friendly: Works anywhere Docker runs.

Pros

  1. Real dependencies: Tests catch issues mocks miss.
  2. Free to use: Open source under the Apache-2.0 licence, so the core tool costs nothing to use.
  3. Actively maintained: The repository had commits as recent as 19 October 2026.
  4. Community: About 4,500 GitHub stars.

Cons

  1. Needs Docker: Not available in every CI environment.
  2. Slower than unit tests: Container start-up adds time.
pool, _ := dockertest.NewPool("")
res, _ := pool.Run("postgres", "16", []string{"POSTGRES_PASSWORD=secret"})
defer pool.Purge(res)

Resources:

Pricing

dockertest is free and open source under the Apache-2.0 licence.

  1. Go teams writing integration tests against real services.
  2. Not a fit without Docker; consider Testcontainers for richer modules.

Conclusion

dockertest is a simple, maintained way to use real containers in Go integration tests.

On CheckOps, dockertest is filed under the Integration testing stage. Related tools listed here include Testcontainers, Go testing package, Testify, GoMock (uber-go/mock), Moto and WireMock. Before choosing, compare them on licence, supported languages and platforms, hosting model, and how well each fits your existing CI pipeline. Facts on this page were checked against the official website, documentation and repository on 11 November 2026; statements the vendor makes about its own product are marked as vendor claims.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with dockertest side by side.