Keploy as a Docker testing framework
Keploy records traffic inside a running Docker container, capturing the requests a service serves and every downstream call it makes, then replays them in CI. The resulting tests need no Compose stack, no Testcontainers, and no Docker daemon in the runner.
keploy record -c "docker compose up orders"What Keploy gives a Docker team
Any image, any language
Keploy records inside the container at the socket layer, so the base image, language, and framework do not matter. A Compose service, a standalone container, or a plain binary all record the same way.
- Any base image or runtime
- Compose services and standalone containers
- No Dockerfile change
- No entrypoint wrapper in the image
Why Docker integration tests slow teams down
The friction is rarely the assertions. It is everything around them — spinning up dependencies, keeping mocks honest, and repairing tests after every refactor.
Testing Docker: by hand, with Docker Compose + Testcontainers, or with Keploy
Compose and Testcontainers start a real stack in every job and need a Docker runtime to do it. Keploy records that stack once and replays it as a plain process.
Select any row for the full comparison, with code.
What you write for Docker vs what Keploy records
All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.
Three fakes standing in for three images, each encoding a guess about behaviour nothing verifies against the real container.
Genuine fidelity, and a second deployment definition to maintain — plus four image pulls and two healthcheck loops before the first assertion.
The recording already contains Postgres, Redis, and Kafka responses, so this job exercises the same paths without starting a single container.
Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.
Docker testing tools, compared
The options a team on service and platform integrations actually reaches for, and where each one genuinely wins. Select a row for the full comparison.
Assessments reflect each tool’s documented behaviour, not benchmark measurements.
Record your Docker app once, replay it forever
Keploy sits below your Docker process at the network layer. It watches the calls your app already makes, then serves them back on replay so tests run with no dependencies attached.
Keploy records a GET call to /api/v1/orders/{id} on a Docker service and captures the dependency calls it makes.
What Keploy mocks for Docker, with zero config
7 of the 7 dependencies a typical Docker service talks to are stubbed from the recording itself — no mock classes, no fixture files, no containers in CI.
- Auto-mocked
PostgreSQLView page
Postgres protocol to a linked container
- Auto-mocked
MySQLView page
MySQL protocol to a linked container
- Auto-mocked
RedisView page
RESP to a linked container
- Auto-mocked
MongoDBView page
Wire protocol to a linked container
- Auto-mocked
Apache KafkaView page
Kafka protocol to a linked broker
- Service-to-service HTTPAuto-mocked
Service-to-service HTTP
Any call between Compose services
- Auto-mocked
gRPCView page
HTTP/2 framed calls between containers
Your first Docker test suite in under five minutes
Every command below runs against your existing Docker service. Nothing in your source tree changes.
1Install the Keploy CLI
A single binary. It needs a Linux kernel with eBPF support, or Docker on macOS and Windows — and it adds nothing to your project's dependencies.
curl -sSL https://keploy.io/install.sh | bash2Record your service
Pass the command you already use to start the app. Keploy runs it and watches every socket it opens.
keploy record -c "docker compose up orders"3Exercise the paths you care about
Record once with your Compose stack up. Every database, cache, and broker call the request triggered is captured, so later runs need none of them.
docker compose up -d postgres redis kafkacurl -X POST localhost:8080/orders/ord_1/confirm -d '{"paymentToken":"tok_123"}'4Replay in CI
Replay serves the recorded dependency responses, so the job needs no service containers and no Docker daemon.
keploy test -c "node dist/server.js" --delay 8
Ready to try it on your own Docker service?
Works with the rest of your Docker stack
Keploy records at the network layer, so framework and driver choices inside your Docker app do not change how it captures traffic.
Kubernetes
The infra page covers recording inside a pod.
Node.js
Containerised Node services record with no image change.
Go
A static binary in a scratch image records the same way.
Java
JVM containers record without an agent.
PostgreSQL
Linked database containers record at the protocol layer.
Apache Kafka
Linked brokers record at the protocol layer.
Testing the rest of your stack
- Cloud & Infra
Keploy as a Kubernetes testing framework
Record traffic from a running pod and replay it as tests in CI, without a cluster, a namespace, or a service mesh.
Read the guide - Databases
Keploy as a PostgreSQL testing framework
Record the Postgres frontend/backend protocol once and replay real result sets in tests — no container, no pg-mem, no schema to rebuild.
Read the guide - Caches & Stores
Keploy as a Redis testing framework
Record RESP traffic once and replay real cache hits, misses, TTLs, and pipeline responses without a Redis server in CI.
Read the guide - Message Queues
Keploy as a Apache Kafka testing framework
Test producers and consumers against recorded broker exchanges — no embedded Kafka, no Testcontainers cluster, no flaky poll loops.
Read the guide - Languages
Keploy as a Node.js testing framework
Replace nock registrations and in-memory database fixtures with tests recorded from the traffic your Node service already serves.
Read the guide - Languages
Keploy as a Go testing framework
Record a running Go binary once and get table-test-grade coverage with sqlmock-free database stubs and no httptest servers to maintain.
Read the guide
Join our GlobalCommunity
Connect with developers worldwide. Follow updates, ask questions, share feedback, and ship faster with other Keploy builders.
“Best report of integration and API tests I've seen — which we don't get from RestAssured.”
G2“Future of microservices testing. I don't write tests now!”
G2 · 5/5“An amazing product that simplifies the automation.”
Gartner · 4.0