Keploy as a Symfony testing framework
Keploy tests Symfony applications by recording real requests through the running server and every Doctrine query or HttpClient call they trigger, then replaying both as assertions. No test kernel boots and no fixtures are loaded.
keploy record -c "symfony server:start --no-tls"What Keploy gives a Symfony team
Any Symfony app, unchanged
Keploy runs the app through the Symfony CLI server, FrankenPHP, or PHP-FPM. Event listeners, the security firewall, and ParamConverters all execute because capture is at the socket.
- Symfony 6 and 7
- CLI server, FrankenPHP, or FPM
- Event listeners and subscribers run
- Security firewall genuinely exercised
Why Symfony 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 Symfony: by hand, with PHPUnit + Guzzle MockHandler, or with Keploy
WebTestCase boots a kernel in the test environment with fixtures loaded. Keploy records the running app under production configuration, so neither diverges from what you deploy.
Select any row for the full comparison, with code.
What you write for Symfony vs what Keploy records
All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.
The controller is constructed by hand, so the firewall, ParamConverter, and every event listener are absent from what this proves.
Drives the real kernel, which is right — and under the test environment, with fixtures and a MockHttpClient response typed out by hand.
Recorded under the configuration you deploy, so an env-conditional service or a cache setting that only differs in the test environment cannot hide a bug here.
Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.
Symfony testing tools, compared
The options a team on PHP 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 Symfony app once, replay it forever
Keploy sits below your Symfony 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 Symfony service and captures the dependency calls it makes.
What Keploy mocks for Symfony, with zero config
7 of the 7 dependencies a typical Symfony 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
MongoDBView page
MongoDB wire protocol
- Auto-mocked
RedisView page
RESP over TCP
- Auto-mocked
Apache KafkaView page
Kafka producer and consumer protocol
- Auto-mocked
gRPCView page
HTTP/2 framed gRPC calls
- Outbound HTTPAuto-mocked
Outbound HTTP
Any HTTP client call the service makes
Your first Symfony test suite in under five minutes
Every command below runs against your existing Symfony 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 "symfony server:start --no-tls"3Exercise the paths you care about
Drive the running server. Every request becomes a test case with its database and HTTP calls captured alongside.
curl -X POST localhost:8000/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 "symfony server:start --no-tls" --delay 8
Ready to try it on your own Symfony service?
Works with the rest of your Symfony stack
Keploy records at the network layer, so framework and driver choices inside your Symfony app do not change how it captures traffic.
PHP
The language page covers driver-level coverage in depth.
Laravel
The framework page covers Eloquent-level capture.
MySQL
PDO traffic records at the protocol layer.
PostgreSQL
PDO_pgsql records identically.
Redis
phpredis exchanges record in order.
Composer
Nothing to require — Keploy is a CLI, not a package.
Testing the rest of your stack
- Languages
Keploy as a PHP testing framework
Record a running PHP app once and replay real PDO result sets and Guzzle responses without a MockHandler stack per test.
Read the guide - Frameworks
Keploy as a Laravel testing framework
Test Laravel routes against recorded Eloquent queries and real HTTP responses, without RefreshDatabase or Http::fake.
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 - 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 RabbitMQ testing framework
Test publishers and consumers against recorded AMQP exchanges, with no broker to start and no queue to declare.
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