Keploy as a Dragonfly testing framework
Keploy records the RESP protocol exchanges your service has with Dragonfly, then replays them byte for byte in tests. Your Redis client runs unchanged and does its real work on every run, but CI needs no Dragonfly instance, no schema and no seed data.
keploy record -c "<your app start command>"What Keploy gives a Dragonfly team
Every Dragonfly call your service makes
Keploy records RESP exchanges with Dragonfly, so a service using it as a cache can be tested with nothing running and no cache warm-up step.
- RESP protocol captured
- Hits and misses both kept
- Multi-threaded behaviour as observed
- No Dragonfly in CI
Why Dragonfly 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 Dragonfly: by hand, with Testcontainers, or with Keploy
Testcontainers gives a test a real Dragonfly process at the cost of running one. A hand-written stub is cheap but never exercises RESP. Keploy replays the recorded exchange with nothing running.
Select any row for the full comparison, with code.
What you write for Dragonfly vs what Keploy records
All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.
A hand-written stub of the Dragonfly client. The driver never runs.
Testcontainers runs the real Dragonfly. Fidelity is genuine; the job pays for it.
Recorded from one real request. Nothing here was typed by hand.
Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.
Dragonfly testing tools, compared
The options a team on caches and search stores 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 Dragonfly app once, replay it forever
Keploy sits below your Dragonfly 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 Dragonfly service and captures the dependency calls it makes.
What Keploy mocks for Dragonfly, with zero config
6 of the 6 dependencies a typical Dragonfly service talks to are stubbed from the recording itself — no mock classes, no fixture files, no containers in CI.
- Auto-mocked
RedisView page
RESP beneath the cache client
- Auto-mocked
MemcachedView page
The text protocol beneath the client
- Outbound HTTPAuto-mocked
Outbound HTTP
Every outbound HTTP call
- Auto-mocked
PostgreSQLView page
The store being cached in front of
- Auto-mocked
MongoDBView page
Wire protocol, where documents are cached
- Auto-mocked
ElasticsearchView page
Search responses over HTTP
Your first Dragonfly test suite in under five minutes
Every command below runs against your existing Dragonfly 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 "<your app start command>"3Exercise the paths you care about
Use curl, your frontend, or an existing smoke script. Every request becomes a test case with its Dragonfly calls captured alongside it.
curl -X POST localhost:8080/orders/o-1/confirmcurl localhost:8080/orders/o-14Replay in CI
Replay serves the recorded dependency responses, so the job needs no service containers and no Docker daemon.
keploy test -c "<your app start command>" --delay 10
Ready to try it on your own Dragonfly service?
Works with the rest of your Dragonfly stack
Keploy records at the network layer, so framework and driver choices inside your Dragonfly app do not change how it captures traffic.
Testing the rest of your stack
- 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 - Caches & Stores
Keploy as a Memcached testing framework
Record Memcached get, set, and miss exchanges once and replay real cache behaviour without a running daemon.
Read the guide - Caches & Stores
Keploy as a Elasticsearch testing framework
Record real Elasticsearch search responses once and replay them in tests without a cluster, an index, or a refresh wait.
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 - Languages
Keploy as a Java testing framework
Generate JUnit-grade integration tests for any JVM service by recording the traffic it already serves.
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
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!”
Mahfooz A. · G2 · 5/5“An amazing product that simplifies the automation.”
Gartner · 4.0