WireMock is the long-standing standard for stubbing HTTP services in automated tests, especially on the JVM. ReqRes is a hosted REST backend you call with fetch(). They are rarely either/or: WireMock lives inside your test suite, and ReqRes is a backend your app, your QA team and your demos can all reach.
TL;DR
- WireMock is an open-source (Apache 2.0) HTTP stubbing server that runs as a Java library, a standalone JAR or in Docker. WireMock Cloud is the hosted version.
- ReqRes is hosted from the start: persistent collections, app-user login, request logs, and a free no-signup demo API.
- WireMock is unmatched for request matching, fault injection and verifying exactly what your code sent.
- ReqRes is faster to start and easier to share, because there are no stubs to write and nothing to run.
- Pick WireMock for backend integration tests. Pick ReqRes for frontend development, cross-team QA, teaching and demos.
What WireMock is
WireMock stubs HTTP APIs so tests can run without the real service. You define stubs (request matchers plus responses) in code or JSON mappings.
Its strengths:
- Deep request matching and a request journal for verifying calls
- Response templating with Handlebars
- Fault injection - fixed or random delays, dropped connections, malformed chunks, empty responses
- Record and playback - proxy a real API and turn the traffic into stubs
- State machines ("scenarios") so a stub can answer differently on later calls
- Testing integrations - JUnit 4 and 5, Testcontainers, and Docker
- Other protocols - the docs list GraphQL, gRPC and WebSocket support
WireMock Cloud is the hosted product. Its free plan allows 1,000 calls a month, 1 user and 3 mock APIs. Stateful mocking, chaos testing and team features are on Enterprise, which is priced by quote.
What ReqRes is
- A free demo API at
https://reqres.in/api/userswith no signup, plus?delay=for slow responses - Projects with persistent collections, app-user authentication, request logs and custom endpoints
- Failure scenarios on demand. Three are free (429 with
Retry-After, 422 validation error, malformed JSON); all 15 come with the Agent Developer plan.
Key differences
| Aspect | ReqRes | WireMock |
|---|---|---|
| Where it runs | Hosted, public URL | Inside your tests, a JAR or Docker (Cloud is hosted) |
| Setup | Sign up, get a key, call it | Add the library or container, write stub mappings |
| Data | Stored records you create, read and update | Stubs; state via scenarios, no built-in data store |
| User auth | Real app users, magic-code login, sessions | Stubbed by matching headers or tokens |
| Verification | Request logs in a dashboard | Request journal, precise call assertions |
| Fault injection | Named scenarios, ?delay= |
Delays, connection resets, malformed responses |
| Best audience | Frontend, QA, educators, demos | Backend and integration test suites |
| Hosted free tier | 250 requests/day, plus a no-signup demo API | 1,000 calls/month on WireMock Cloud |
When to choose ReqRes
- You are building a UI and need a backend that stores data and logs users in, today.
- Several people or devices need the same API, such as QA on a phone, a designer on a preview link, a class of students.
- You want to see what your app sent without adding a test harness.
- You do not want to write stubs for create, read, update and delete.
When to choose WireMock
- You are testing a service that calls other services, and need to stub them precisely.
- You need to assert exactly what was sent, for example that a call happened twice with a given body.
- You need low-level faults, such as a reset connection or a half-written response.
- Your tests must run offline and fast in CI, on the JVM or in containers.
- You want to record a real API and replay it.
Side by side
ReqRes - store and fetch real records from a frontend:
const headers = {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_MANAGE_KEY', // pro_* key for writes, keep it server-side
};
await fetch('https://reqres.in/api/collections/tickets/records', {
method: 'POST',
headers,
body: JSON.stringify({ data: { subject: 'Login fails on Safari', priority: 'high' } }),
});
WireMock - stub a dependency inside a Java test:
stubFor(post(urlEqualTo("/tickets"))
.willReturn(aResponse()
.withStatus(201)
.withHeader("Content-Type", "application/json")
.withBody("{\"id\": 1, \"priority\": \"high\"}")));
The WireMock stub always returns the same ticket. ReqRes returns whatever was actually stored.
Using both
A common split: WireMock inside backend integration tests, where precision and isolation matter, and ReqRes for the frontend and QA work around it, where people need a shared, working API with real data.
ReqRes is not for you if...
- You need to verify the exact requests a service made in an automated test
- You need connection-level faults such as resets or malformed chunks
- Your tests must run fully offline
- You need to record and replay an existing API
Common questions
Is ReqRes a WireMock alternative?
For frontend and manual QA work, often yes, because it removes the stub-writing and hosting. For backend integration tests that need precise matching and verification, WireMock remains the better tool.
Can WireMock persist data like ReqRes?
Open-source WireMock uses scenarios (a state machine) rather than a data store. WireMock Cloud offers dynamic state, but its docs say stored values are held in a cache with no guarantee of how long they persist. ReqRes stores records until you delete them.
Do I need Java for WireMock?
WireMock is written in Java, but it also runs as a standalone server or Docker container, so any language can call it over HTTP. ReqRes needs nothing beyond an HTTP client.
Next step
- Best mock API tools, by use case
- Call the free demo API - no signup
- Create a project - persistent collections, auth and logs
- Test error handling