WireMock Cloud
Hosted service virtualization with no infrastructure to manage — import any API spec, simulate production behaviour, and run chaos scenarios at scale. Try WireMock Cloud >
WireMock Cloud
Hosted service virtualization with no infrastructure to manage — import any API spec, simulate production behaviour, and run chaos scenarios at scale. Try WireMock Cloud >
Service virtualization replaces real upstream services — third-party APIs, internal dependencies, legacy systems — with a controlled simulation, so teams can develop and test without being blocked by availability, cost, or instability of those services.
WireMock OSS solves the core problem: your code depends on a service you don’t control, and that service is unavailable, unreliable, or too expensive to hit in development and CI. OSS gives you everything needed to simulate it:
This covers the majority of service virtualization needs for a single developer or a small team working in a shared repo.
As teams grow and APIs multiply, the problems shift from simulation fidelity to coordination, consistency, and operations. WireMock Cloud is built for that layer:
WireMock standalone is the most direct way to implement service virtualization with OSS. Run it as a persistent process in your development or CI environment and point your application at it instead of the real upstream service.
Start WireMock as a standalone virtual service:
java -jar wiremock-standalone-3.13.2.jar --port 8080 --root-dir ./service-mocksPlace stub mappings under ./service-mocks/mappings/ and any static response body files under ./service-mocks/__files/. WireMock serves them immediately without a restart.
Run in Docker:
docker run -it --rm \ -p 8080:8080 \ --name wiremock \ -v $PWD/service-mocks:/home/wiremock \ wiremock/wiremock:3.13.2The container reads mappings/ and __files/ from /home/wiremock, so mount your local service-mocks/ directory there.
The fastest way to build an initial virtual service is to record a real one. WireMock acts as a proxy, captures all traffic, and writes stub mappings automatically:
java -jar wiremock-standalone-3.13.2.jar \ --proxy-all="https://api.example.com" \ --record-mappings \ --root-dir ./service-mocksRun your application against http://localhost:8080 and all interactions are captured as replayable stubs. See Record and Playback for full options.
Dynamic responses via response templating — echo request values, generate random IDs, format dates, and build conditional payloads using Handlebars:
{ "request": { "method": "GET", "urlPathPattern": "/orders/[0-9]+" }, "response": { "status": 200, "jsonBody": { "orderId": "{{request.pathSegments.[1]}}", "createdAt": "{{now format='yyyy-MM-dd'}}", "status": "PENDING" }, "transformers": ["response-template"] }}Stateful workflows via scenarios — model multi-step sequences where the response changes based on previous interactions:
stubFor(post("/cart/checkout") .inScenario("Checkout") .whenScenarioStateIs(STARTED) .willReturn(ok().withBody("Processing")) .willSetStateTo("Completed"));
stubFor(get("/cart/status") .inScenario("Checkout") .whenScenarioStateIs("Completed") .willReturn(ok().withBody("Order confirmed")));Fault and latency simulation via fault injection — test application resilience against degraded dependencies:
stubFor(get("/payments/process") .willReturn(aResponse() .withStatus(503) .withFixedDelay(2000) .withBody("Service temporarily unavailable")));Learn more about WireMock Cloud’s approach to service virtualization: wiremock.io/use-case/service-virtualization →
WireMock Cloud removes the infrastructure overhead of service virtualization. Virtual services are centrally hosted, shared across the team, and accessible from any environment without network configuration.
1. Create a free account
Sign up at wiremock.io — no credit card required.
2. Create a mock API
From the dashboard, create a new mock API. You can:
3. Point your application at the mock URL
Each mock API gets a stable hosted URL. Replace your real service endpoint with it in your environment config — no VPN, no local process, no port forwarding.
Via the WireMock CLI:
npm i -g @wiremock/cliwiremock loginThen use the CLI to push stubs, trigger recordings, and manage mock APIs from your terminal or CI pipeline. Full CLI reference: docs.wiremock.io
Cloud’s state store lets you model workflows that change over time — order progressions, payment flows, multi-step onboarding — with state shared across all team members and CI pipelines. Unlike OSS scenarios (which are per-process), Cloud state persists across requests from any client.
Set up a stateful mock from the dashboard under Mock API → Stubs → Add stateful behaviour, or use the agent skill in Claude Code:
/convert-to-statefulCloud’s chaos module injects realistic failure conditions into your virtual services — latency spikes, partial outages, error rate percentages, and connection resets — without modifying individual stubs.
Enable chaos on any mock API from the dashboard under Mock API → Chaos, or via the CLI:
wiremock chaos enable --mock-api <your-api-id> --mode latency --latency-ms 2000WireMock Cloud’s MCP server and Claude Code agent skill let you build and manage virtual services through natural language. From within Claude Code:
Install the skill:
claude plugin marketplace add wiremock-inc/skillsclaude plugin install wiremock-cloud@wiremock-inc-skillsThen generate a complete virtual service from a description, spec, or codebase:
/build-api-simulationThe agent creates the mock API, generates stubs, and imports them — ready to use in seconds. See AI for WireMock for the full picture.
WireMock Runner extends Cloud into environments where hosted endpoints aren’t enough — running behind a firewall, in a private CI network, or alongside a local development server. Mocks are centrally managed in Cloud; Runner handles serving them locally.