This page explains concepts behind WireMock Runner. To start using the Runner right away, follow the instructions here WireMock Runner runs as a service anywhere you want and enables you to record, to sync with Cloud, and to host mock APIs in your own infrastructure while continuing to use WireMock Cloud’s management interface and collaboration features as a centralized control plane. This hybrid mode splits the difference between Cloud-only and fully self-managed, letting you mix the benefits of Cloud with local development workflows and execution in your own private cloud infrastructure.Documentation Index
Fetch the complete documentation index at: https://docs.wiremock.io/llms.txt
Use this file to discover all available pages before exploring further.
What is WireMock Runner?
WireMock Runner is a long-running service packaged as a container that can be run anywhere you can deploy it. It connects to WireMock Cloud for configuration and collaboration, but executes recordngs and runs mock APIs locally in your environment. This architecture creates a clear separation of concerns:- The control plane (management, UI, collaboration) remains in WireMock Cloud
- The execution plane (mock API execution) runs wherever you need it - locally via CLI, in your environments via WireMock Runner or in WireMock Cloud.
Why WireMock Runner Exists
Traditional API mocking solutions force teams to choose between two extremes: Fully cloud-based approaches offer convenience and collaboration but struggle when APIs live behind firewalls, when teams need fast local feedback loops, or when security policies prohibit external connections. Fully self-hosted approaches provide control and privacy but require significant infrastructure investment, eliminate the benefits of cloud collaboration, and create maintenance overhead. WireMock Runner was designed to resolve this tension. It enables teams to adopt the workflow that matches their needs rather than adapting their needs to match the tool’s constraints.How WireMock Runner Works
The Runner operates as a containerized service with two primary modes:Record Mode
In record mode, the Runner automatically creates or updates mock APIs by capturing real API traffic. This allows teams to build or refresh mock specifications from actual service behavior, keeping mocks aligned with reality as APIs evolve. Recording can happen locally during development, in CI/CD during integration tests or deployments, or in any environment where you need to capture API interactions (see Recording on Kubernetes for an example).Serve Mode
In serve mode, the Runner serves mock APIs locally, responding to incoming requests based on stub definitions — all without requests ever leaving your infrastructure. Before the Runner can serve a mock API locally, the mock specification must first be pulled from WireMock Cloud to your local machine using the WireMock CLI:wiremock pull <mock-api-id>
See Pulling a mock API from WireMock Cloud for full details.
Once pulled, the Runner uses the locally stored mock configuration to match and respond to incoming requests.
This enables development, testing, and production-like environments to operate with simulated APIs while remaining completely isolated from external networks.
Mode Switching
The Runner can be switched between modes dynamically via its HTTP management interface. This allows the same Runner instance to record new interactions during certain workflows and serve those interactions during others—orchestrated by your existing automation.Using WireMock Runner
Git and CI/CD Integration
Mock specifications can live in version control alongside the code they support. WireMock Runner can pull the latest mocks at the start of a CI run, record new interactions during tests, and push updated specifications back to Git—all automated within your existing CI/CD pipeline. This treats mocks as first-class artifacts: versioned, reviewed through pull requests, and promoted through environments just like application code. See Promoting APIs with Git and CI/CD for a detailed workflow guide.Environment-Specific Configuration
Different environments often require different mock behavior. WireMock Runner supports environment-specific profiles, allowing you to maintain variations for local development, CI, staging, and production-like environments—all in the same repository, all promoted through the same workflow.Multi-Location Deployment
Because Runner is a container, it can be deployed anywhere:- On a developer’s laptop for fast local iteration
- Inside a CI pipeline for automated testing
- In a Kubernetes cluster behind the firewall for team environments (see Running on Kubernetes)
- In multiple regions or data centers for distributed teams