Keploy as a MariaDB testing framework
Keploy mocks MariaDB by recording its wire protocol beneath your driver, capturing the exact result sets your queries returned, then replaying them during tests. No MariaDB instance runs in CI, no schema is created, and no seed script is involved.
keploy record -c "java -jar orders.jar"What Keploy gives a MariaDB team
Captured at the MariaDB wire protocol
MariaDB speaks a MySQL-compatible protocol with its own extensions. Keploy records beneath the driver, so what replays is the bytes the server sent — including MariaDB-specific capability flags.
- Below MariaDB Connector/J, mysql2, PyMySQL
- Column types from the server's metadata
- Prepared statements and parameters
- Transactions replay in order
Why MariaDB 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 MariaDB: by hand, with Testcontainers MariaDB, or with Keploy
Testcontainers gives real MariaDB semantics and charges a container per job. Keploy records that server once and replays its responses with no runtime at all.
Select any row for the full comparison, with code.
What you write for MariaDB vs what Keploy records
All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.
MariaDB's RETURNING clause, its sequences, and its JSON functions are all invisible to this stub, so a dialect bug reaches production.
Real dialect semantics — and every CI job touching this class pulls an image, boots a server, and runs the init script first.
The server banner is recorded with the exchange, so a recording made against MariaDB cannot be mistaken for one made against MySQL.
Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.
MariaDB testing tools, compared
The options a team on relational databases 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 MariaDB app once, replay it forever
Keploy sits below your MariaDB 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 MariaDB service and captures the dependency calls it makes.
MariaDB clients Keploy records, driver by driver
Keploy captures MariaDB at the wire protocol, so 5 of these 6 clients need no adapter, no test double, and no MariaDB instance in CI.
- Auto-mocked
JavaView page
MariaDB Connector/J and Spring Data JPA
- Auto-mocked
Node.jsView page
mariadb, mysql2, and Prisma
- Auto-mocked
PythonView page
mariadb, PyMySQL, and SQLAlchemy
- Auto-mocked
GoView page
go-sql-driver/mysql and GORM
- Auto-mocked
PHPView page
PDO_MySQL and Eloquent
- Partial
.NETView page
MySqlConnector
Your first MariaDB test suite in under five minutes
Every command below runs against your existing MariaDB 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 "java -jar orders.jar"3Exercise the paths you care about
Run the app with your development MariaDB reachable. Every query and every result set the server returns is captured together.
curl localhost:8080/orders/ord_1curl -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 "java -jar orders.jar" --delay 15
Ready to try it on your own MariaDB service?
Works with the rest of your MariaDB stack
Keploy records at the network layer, so framework and driver choices inside your MariaDB app do not change how it captures traffic.
MySQL
The protocol is compatible, and the dialects have diverged.
Java
Connector/J traffic records without a driver wrapper.
Node.js
mysql2 and Prisma record identically.
PHP
Laravel's MariaDB connection records the same way.
Python
SQLAlchemy queries record as emitted SQL.
Flyway
Migrations still run against a real server; only tests use mocks.
Testing the rest of your stack
- 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 - 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 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 - 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 Python testing framework
Turn the requests your Python service already handles into a pytest-grade regression suite, with every dependency mocked from the recording.
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