WireMock is an HTTP mock server. You define stubs as JSON files, through its REST API or in Java code, or record them by proxying traffic to a real service, and your app under test calls WireMock’s address instead of the real one [1][2]. Stubsmith records too, but from inside your Python or Node process: the SDK captures the outbound calls your code already makes, masks every body value before the capture is sent, and your tests replay the approved recordings without a server.
WireMock does far more than replay: fault injection, delays, templating, stateful scenarios and request verification, from any language that speaks HTTP [3]. Stubsmith does one part of that job, recording real third-party traffic into replayable stubs, and adds masking at the point of capture.
At a glance
| WireMock | Stubsmith | |
|---|---|---|
| What it is | An HTTP mock server, run standalone (JAR, Docker), embedded in JVM tests (JUnit extension) or through Testcontainers modules [3][4][5][6][12] | An SDK in your process plus a hosted service |
| How stubs are made | JSON files, REST API, Java DSL, or Record and Playback through a proxy [1][2] | Recorded from real calls your code makes |
| Languages | Any HTTP client; adapters for Python, .NET, Go, Rust and more [3] | Python and Node |
| Recorded data | Response bodies are stored in the stub mapping by default; no built-in masking option is documented, and custom StubMappingTransformer code can rewrite stubs as they are captured [2] |
Body values masked in your process before sending; sent only for fields you approve |
| Repeated identical requests | Recorded as a Scenario by default (repeatsAsScenarios) [2] |
One recording per status by default, so replay_all() runs a test once per status; after stubsmith pull --samples all --endpoint ..., once per stored sample (3 to 25 per response by plan) |
| License and price | Apache 2.0, free [7]; WireMock Cloud has a free tier and quote-only Enterprise [8] | SDKs MIT; free plan; Team €39 a month for 10 seats, VAT included |
Recording with each
WireMock records by acting as a proxy: you start a recording against a target URL, send traffic through WireMock, and stop the recording, which writes stub mappings under mappings/ [2]. The app must send its requests to WireMock, either by pointing its base URL at WireMock or by using WireMock as a forward proxy [2][11].
Stubsmith records where the SDK is installed, without changing the app’s base URLs:
import stubsmith
stubsmith.install() # key read from STUBSMITH_API_KEY
New request shapes wait in Review until someone approves them, and no bodies are stored before that. A test run then reads the committed bundle:
stubsmith pull --out .stubsmith/bundle.json
def test_card_declined():
with stubsmith.replay():
with pytest.raises(CardDeclined):
charge(amount_cents=950_000)
A request with no recording raises StubNotFound with a diff against the closest recording, and never reaches the network.
Sensitive data
WireMock’s Record and Playback documentation, checked on the date below, describes no option that masks or redacts recorded values. Recorded response bodies go into the stub mapping by default, captureHeaders and excludeHeaders choose which request headers become matchers, and custom StubMappingTransformer code can rewrite stubs as they are captured [2].
Stubsmith masks during capture. A body value without a keep rule becomes "<masked>", 0 or false before the capture leaves your process, and by default no field has a keep rule. Two kinds of value are sent as written: a path segment the SDK does not recognise as an ID, and the values of six transport headers a stub needs to replay. Names are sent as they are: JSON keys, form field names, query-parameter names and header names. So are the method, domain, status and duration of each call. The Security page lists all of it.
Choose WireMock when
- You need fault injection: connection resets, malformed chunks, random data, fixed or random delays [9].
- You mock an API that does not exist yet [3].
- Your tests are in Java or another language Stubsmith has no SDK for, or several services in different languages share one mock [3].
- You need stateful scenarios, response templating, request verification or WebSocket mocking [3][10].
- You want to proxy most calls to a real service and override a few endpoints [11].
Choose Stubsmith when
- The traffic you want to record contains personal data, and real body values must not leave your process unless you approve a field.
- Your code is Python or Node and you would rather not route it through a proxy or change base URLs to record.
- The team should replay one reviewed set of stubs, with a recorded response for every status available to the tests.
What Stubsmith does not do
- Inject faults or delays, template responses, or keep state between requests.
- Mock an API you have never called, or let you edit a stub by hand.
- Serve stubs over HTTP to other languages or services.
- Verify which requests your app made.
Sources
Facts about WireMock are from wiremock.org, docs.wiremock.io, wiremock.io and the WireMock repository (latest stable release 3.13.2), last checked 2026-11-19. Corrections are welcome at legal@stubsmith.dev.