WireMock and Jitterbox both give your code a fake version of an API it depends on. The difference is where that fake lives and what it's built to answer. WireMock is a mature, open-source mock server you run yourself. Jitterbox is a hosted service built around one question: what does your code do when the API it calls is slow, flaky or down?
If you're looking for a WireMock alternative, the honest answer depends on which of those you need. Here's how they compare, with the places where WireMock is the better choice spelled out.
Who each tool is for
WireMock is for teams that want full control. You run it as a standalone JAR, as a Docker container, or embedded straight into JVM tests with JUnit, and there are Testcontainers modules for spinning it up per test run. Stubs, request matching and Handlebars response templating cover a huge range of API shapes, and it's one of the best-known tools for HTTP mocking on the JVM.
Jitterbox is for teams that mostly care about failure behavior. You get a real HTTPS URL (https://<projectKey>.jitterbox.dev), point your app or tests at it, and switch on failure scenarios. Nothing to install or keep running. The trade is that it's hosted only: your test traffic goes through jitterbox.dev, and there's no self-hosted version.
How fault injection compares
Both can break things on purpose, in different ways.
WireMock's fault features, per its docs:
- Delays: a fixed delay per stub (
fixedDelayMilliseconds), or a random one from auniformorlognormaldistribution viadelayDistribution. Both can also be set globally. - Slow bodies:
chunkedDribbleDelaysplits the body into chunks over a total duration, which is handy for testing read timeouts. - Bad responses:
EMPTY_RESPONSE,MALFORMED_RESPONSE_CHUNK,RANDOM_DATA_THEN_CLOSEandCONNECTION_RESET_BY_PEER. The docs note the reset only works properly on Unix-like systems. - State: scenarios are a state machine, so stub A can answer until something moves the scenario to the next state, then stub B takes over.
Jitterbox puts failures in scenarios that sit on top of your endpoints. A rule can fire every time, for a share of requests (say 20%), or in a sequence like "fail twice, then succeed", which is exactly what you need to test retries. Faults include any status code with custom headers (a 429 with Retry-After), fixed or ranged latency, a timeout that hangs and then gives up, dropped connections, and broken bodies: invalid JSON, a cut-off or empty body, or the wrong content type. A single request can force a fault with the X-Jitterbox-Fault header, and X-Jitterbox-Seed makes random rules repeatable.
LLM APIs and streaming
This is the biggest gap between the two. Jitterbox has endpoint types that speak OpenAI Chat Completions, OpenAI Responses and Anthropic Messages, streaming included, so the official SDKs work against it by changing baseURL. Then it breaks them the way providers actually break: provider-format 429 and 529 errors, a slow first token, a slow stream, a stream cut partway, a malformed chunk, a missing end event, and tool-call arguments cut short. See LLM failure testing.
We didn't find a built-in OpenAI or Anthropic endpoint type, or LLM stream faults, in WireMock's open-source docs. You'd build those responses and failure cases yourself.
Seeing what your client did
WireMock records requests in an in-memory request journal, and verify() lets a test assert that a matching request arrived, or arrived a set number of times. That's precise, and it lives in your test code.
Jitterbox shows every request in a live log with what was sent, what came back and why each fault fired. On top of that, the resilience report groups each call with its retries and grades the client: did it retry transient failures, respect Retry-After, back off, give up eventually, leave permanent errors alone, keep its idempotency key, and time out instead of hanging? With WireMock, checking that a retry waited long enough is an assertion you write and maintain yourself.
Running it in CI
WireMock runs wherever your tests run: in the same JVM, or as a container next to your app. No network calls leave the build.
Jitterbox runs your existing tests against a failure scenario with npx jitterbox run --scenario "Flaky gateway" -- npm test, or the GitHub Action MadhavKauntia/jitterbox-cli@v1, and fails the build on a bad grade. The CLI and Action are open source under MIT; the service itself isn't. See Jitterbox in CI.
When WireMock is the better choice
Pick WireMock when any of these matter more than a hosted failure lab:
- You need it open source and self-hosted, or test traffic can't leave your network.
- Your tests must run offline or inside the JVM process, with no network hop.
- You need gRPC (an extension since WireMock 3.2.0) or a deep extension ecosystem of custom matchers and transformers.
- You run high volumes. Jitterbox is in beta with limits: 500 mock requests a day, 1 project, 10 endpoints and 2 scenarios.
- You want a big, long-standing community and plenty of existing examples.
WireMock also sells a hosted product, WireMock Cloud, with a free tier and paid plans that add team features, stateful mocking and AI tooling. See their pricing page.
When Jitterbox is the better choice
- You want a real URL in minutes, with nothing to install or keep running.
- You're testing an LLM app and need OpenAI or Anthropic streams that fail realistically.
- You want a grade on retries, backoff,
Retry-Afterand timeouts instead of writing those assertions yourself. - You want failure runs in CI that fail the build when the client behaves badly.
Using both
They don't have to compete. A sensible split: WireMock for fast, offline unit and integration tests, and Jitterbox for a handful of failure scenarios in CI and for anything that talks to an LLM. How it works walks through Jitterbox end to end.