Keploy logo
Quarkus logo

Keploy as a Quarkus testing framework

Keploy tests Quarkus applications by recording real requests through the running application and every JDBC or REST client call they trigger, then replaying both as assertions. There is no @QuarkusTest to boot per test class and no @InjectMock to declare.

Generate Quarkus tests free
keploy record -c "java -jar target/quarkus-app/quarkus-run.jar"
18.4K+VS Code1.2M+300M+mocks created

What Keploy gives a Quarkus team

JVM and native mode alike

Keploy runs the runner JAR or the native binary. RESTEasy Reactive, Panache, and reactive routes all record the same way because capture is at the socket rather than inside the Arc container.

  • Quarkus 3.x, JVM or native
  • RESTEasy Reactive and Classic
  • Panache and plain Hibernate
  • Reactive and blocking endpoints
The problem

Why Quarkus 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.

Three ways to do it

Testing Quarkus: by hand, with JUnit 5 + Mockito, or with Keploy

@QuarkusTest boots per profile and @InjectMock removes the call it was named for. Keploy records the real application once — JVM or native — and replays what it served.

Select any row for the full comparison, with code.

Same coverage, three costs

What you write for Quarkus vs what Keploy records

All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.

By hand2–4 hours
OrderServiceTest.java
hand-written
// Hand-written: no container, everything constructed by hand.
package com.acme.orders;
 
class OrderServiceTest {
 
@Test
void confirmsAnAuthorizedOrder() {
var repo = new FakeOrderRepository();
repo.seed(new Order("ord_1", 4200, "NEW"));
 
var service = new OrderService(repo, new FakePayments("AUTHORIZED"));
 
var result = service.confirm("ord_1", "tok_123");
 
assertEquals("CONFIRMED", result.state());
}
}

Fast, because Arc is never involved — which also means interceptors, validation, and the JAX-RS layer are all absent from what this proves.

JUnit 5 + Mockito1–2 hours
OrderResourceTest.java
tool-assisted
// @QuarkusTest + @InjectMock + REST Assured.
package com.acme.orders;
 
@QuarkusTest
class OrderResourceTest {
 
// Replaces the real HTTP call, and the check that it works.
@InjectMock
@RestClient
PaymentsClient payments;
 
@Test
void confirmsAnAuthorizedOrder() {
when(payments.authorize("tok_123")).thenReturn(new AuthResult("AUTHORIZED"));
 
given().contentType(JSON).body("{\"paymentToken\":\"tok_123\"}")
.when().post("/orders/ord_1/confirm")
.then().statusCode(200).body("state", equalTo("CONFIRMED"));
}
}

Drives the real JAX-RS layer — and the payment client is mocked, so the one integration this test is named for never happens.

With Keploy~5 minutes
test-1.yaml
auto-generated
# Recorded with: keploy record -c 'java -jar target/quarkus-app/quarkus-run.jar'
# Nobody wrote this file. Keploy captured it from a real request.
version: api.keploy.io/v1beta1
kind: Http
name: test-1
spec:
req:
method: POST
url: /orders/ord_1/confirm
body: '{"paymentToken":"tok_123"}'
resp:
status_code: 200
body:
id: "ord_1"
state: "CONFIRMED"
amountMinor: 4200
noise:
- body.confirmedAt
mocks:
- kind: SQL
operation: "select o.id, o.amount_minor, o.state from orders o where o.id = ?"
- kind: Http
url: https://api.payments.example.com/v1/payment_intents/tok_123/confirm

The recorded case travelled the real JAX-RS layer and made the real REST client call, so both the SQL and the upstream contract are under test.

Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.

Keploy vs the alternatives

Quarkus testing tools, compared

The options a team on the JVM actually reaches for, and where each one genuinely wins. Select a row for the full comparison.

Best in classStrongPartialNot covered

Assessments reflect each tool’s documented behaviour, not benchmark measurements.

How it works

Record your Quarkus app once, replay it forever

Keploy sits below your Quarkus 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 Quarkus service and captures the dependency calls it makes.

Quarkus logo
Your Quarkus app
GET/api/v1/orders/{id}200
RecordingKeploy proxyeBPF · userspace
+3 more Quarkus dependencies
An example shape of a captured call. Your own endpoints and dependencies come from your real traffic, so nothing here has to be written by hand.
Mock coverage

What Keploy mocks for Quarkus, with zero config

7 of the 7 dependencies a typical Quarkus service talks to are stubbed from the recording itself — no mock classes, no fixture files, no containers in CI.

Quick start

Your first Quarkus test suite in under five minutes

Every command below runs against your existing Quarkus service. Nothing in your source tree changes.

  1. 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 | bash
  2. 2Record 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 target/quarkus-app/quarkus-run.jar"
  3. 3Exercise the paths you care about

    Drive the running server. Every request becomes a test case with its database and HTTP calls captured alongside.

    ./mvnw package -DskipTests
    curl -X POST localhost:8080/orders/ord_1/confirm -H 'Content-Type: application/json' -d '{"paymentToken":"tok_123"}'
  4. 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 target/quarkus-app/quarkus-run.jar" --delay 14

Ready to try it on your own Quarkus service?

FAQ

Quarkus testing with Keploy: common questions

Join our GlobalCommunity

Connect with developers worldwide. Follow updates, ask questions, share feedback, and ship faster with other Keploy builders.

1.2M+Installs
18.4K+GitHub
100K+Devs
300M+Mocks
1K+Contributors
#1OSS Trending
4.9★★★★★from 500+ reviews onG2GartnerVS CodeChrome
★★★★★

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
XGitHubSlackYouTubeLinkedIn
Built by developers, for developers.Let's build the future, together.