Keploy as a Elixir testing framework
Keploy tests Elixir services by recording real HTTP and Ecto traffic from a running BEAM process, then replaying it as assertions. There are no Mox behaviours to define, no Bypass server to start, and no Ecto sandbox transaction per test.
keploy record -c "mix phx.server"What Keploy gives a Elixir team
Any Elixir service, unchanged
Keploy runs the app through mix or a release. Phoenix, Plug, and bare Cowboy services record the same way, because capture is at the socket rather than inside the Plug pipeline.
- Elixir 1.14 and above
- mix phx.server or a release
- Phoenix, Plug, and Cowboy
- Umbrella apps included
Why Elixir 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 Elixir: by hand, with ExUnit + Mox, or with Keploy
Mox needs a behaviour to define against and Bypass needs a Plug you write. Keploy captures outside the process, so neither the behaviour nor the stub server has to exist.
Select any row for the full comparison, with code.
What you write for Elixir vs what Keploy records
All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.
The behaviour exists so this stub can satisfy it. Nothing checks that its return shape still matches what Postgres and Stripe actually send.
Idiomatic and concurrency-safe — and it needs a behaviour, a mock module, a migrated database, and a Stripe body typed out by hand.
The SQL Ecto emitted and Stripe's real response are both recorded, so no behaviour had to be introduced and no sandbox transaction was needed.
Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.
Elixir testing tools, compared
The options a team on the BEAM 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 Elixir app once, replay it forever
Keploy sits below your Elixir 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 Elixir service and captures the dependency calls it makes.
What Keploy mocks for Elixir, with zero config
5 of the 5 dependencies a typical Elixir service talks to are stubbed from the recording itself — no mock classes, no fixture files, no containers in CI.
- Auto-mocked
PostgreSQLView page
Postgres frontend/backend protocol
- Auto-mocked
MySQLView page
MySQL wire protocol
- Auto-mocked
RedisView page
RESP over TCP
- Auto-mocked
Apache KafkaView page
Kafka producer and consumer protocol
- Outbound HTTPAuto-mocked
Outbound HTTP
Any HTTP client call the service makes
Your first Elixir test suite in under five minutes
Every command below runs against your existing Elixir 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 "mix phx.server"3Exercise the paths you care about
Drive the running server. Every request becomes a test case with its Ecto queries and HTTP calls captured alongside.
curl -X POST localhost:4000/orders/ord_1/confirm -H 'Content-Type: application/json' -d '{"payment_token":"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 "mix phx.server" --delay 12
Ready to try it on your own Elixir service?
Works with the rest of your Elixir stack
Keploy records at the network layer, so framework and driver choices inside your Elixir app do not change how it captures traffic.
Phoenix
Recorded through the endpoint; the Plug pipeline runs in full.
Ecto
Queries record as the SQL they emit, with real rows.
PostgreSQL
Postgrex traffic records at the protocol layer.
Redis
Redix commands record as ordered RESP exchanges.
Oban
Job inserts appear as the database writes they really are.
Docker
Record in a container or on the host; replay needs neither.
Testing the rest of your stack
- Frameworks
Keploy as a Phoenix testing framework
Record a running Phoenix service once and get integration coverage without defining a Mox mock per behaviour.
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 - Databases
Keploy as a MySQL testing framework
Mock MySQL at the wire protocol instead of standing up a container or swapping in H2 — the rows your queries really returned, replayed.
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