stuntman / providers / wiremock import
WireMock import
Turn the WireMock mappings you already keep into plugins: paths, matchers, answers, delays, scenarios, templates and webhooks.
Stands in for
- WireMock mappings (mappings/*.json and __files/)
- WireMock response templates
- WireMock scenarios
- WireMock webhooks (postServeActions)
- Folders of WSDL files
Everything WireMock import gives you
- 01
Look before importing
dry=true lists, per service, the mappings read, routes and answers it would make, faults, scenarios and gaps.
- 02
Group into services
One service per subfolder of mappings/ (default), per request host, or everything in one.
- 03
Matchers become rules
equalTo, contains, matches, absent, equalToJson, matchesJsonPath, matchesXPath, Basic auth and cookies, in priority order.
- 04
Regex paths kept
urlPattern and urlPathPattern become regex routes; named groups are path parameters.
- 05
Templates keep working
Handlebars answers with now, randomValue, jsonPath, xPath, regexExtract and math; now follows the environment's clock.
- 06
Scenarios as a switch
Mappings with a scenario state become rules on scenario; set_scenario moves a service by hand.
- 07
Webhooks after answers
A webhook serve action becomes a send that fires only after that mapping's answer, with its delay.
- 08
Gaps reported
Nothing is dropped quietly: matchers and fields it cannot convert are listed file by file.
The screens
Each number is a control or a reading on the real screen. Everything you can click there, your agent can do with a tool.
Import a WireMock folder

mappings/ and __files/ on the machine that runs Stuntman; a folder of WSDLs works too.
One service per folder, per host, or everything in one.
A dry run: what it would make, with nothing created yet.
Routes, faults and scenarios each service gets.
Matchers with no equivalent, to write by hand before you trust the service.
- The folder
mappings/ and __files/ on the machine that runs Stuntman; a folder of WSDLs works too.
- How to group
One service per folder, per host, or everything in one.
- Look first
A dry run: what it would make, with nothing created yet.
- Per service
Routes, faults and scenarios each service gets.
- Gaps
Matchers with no equivalent, to write by hand before you trust the service.
An imported mapping is a normal route

Each URL pattern becomes a route; imported routes fall through to the next one, as WireMock tries the next mapping.
Each mapping is one rule in decide and one named answer, in the mappings' priority.
fixedDelayMilliseconds and the median of delayDistribution become the answer's latency.
Edit what was imported in the editor or the file, like any plugin.
- Request patterns
Each URL pattern becomes a route; imported routes fall through to the next one, as WireMock tries the next mapping.
- Matchers as rules
Each mapping is one rule in decide and one named answer, in the mappings' priority.
- Delays
fixedDelayMilliseconds and the median of delayDistribution become the answer's latency.
- Plain YAML
Edit what was imported in the editor or the file, like any plugin.
Break it on purpose
The failures you need to test, exactly when you ask: from the screen or by a tool call, each one shown on the timeline with who caused it.
Imported faultsEMPTY_RESPONSE answers empty; the other WireMock faults reset the connection
kept from the mapping, or force_answer empty | resetAny imported answerAny mapping's response on the next N calls, whatever the request
force_answerA scenario stateJump straight to auth-failure or network instead of replaying the steps
set_scenarioNot matched404 Request was not matched, as WireMock answers
a request no mapping matchesServer and network failures500, 503, timeout or an HTML page, beyond what the mappings had
force_answerSlow answersMore latency than the mapping's fixed delay
set_service latency
Why not the real sandbox
Keep the mocks you have
Years of mappings keep their paths, matchers, answers and scenarios; no rewrite.
A timeline, not a journal
Every call leaves a readable sentence and the rule that picked its answer.
Failures beyond the mappings
Force any answer, a timeout or latency without adding a mapping.
Driven by agents
Every action is an MCP tool: import, switch a scenario, wait for a call.
Your AI agent drives it
Claude Code, Codex or any MCP client connects to /mcp (or calls /api over plain HTTP), sets the stand-in up, breaks it on cue and reads what your app did.
Import our WireMock folder and test the tracking client in its auth-failure scenario.
MCP tools
import_mocksWireMock mappings or WSDLs become services; dry=true only showsset_scenarioMoves a service to a scenario; Started is the normal oneget_pluginThe YAML the import wrotelist_answersAnswers made from the mappings' responsestry_routeRuns a route on a sample requestforce_answerThe next calls get a named answerlist_api_callsCalls with the answer each gotlist_unmatchedRequests no route took
The same over HTTP
- POST
/api/plugins/import - PUT
/api/plugins/{service}/scenario - GET
/api/plugins/{service} - GET
/api/apis/calls
- Not imported: proxyBaseUrl (use recording), equalToXml, binaryEqualTo, multipartPatterns, the /__admin API.
- ANY becomes a GET and a POST route; jsonPath in templates takes plain paths, not filters.