Skip to main content

Overview

The WireMock Runner offers a way to deploy and run long-lived WireMock tasks and control the lifecycle of those tasks via an HTTP interface.

Installation

The Runner is published to Docker Hub as wiremock/wiremock-runner. Running the image will start the runner and expose the HTTP interface based on the configuration specified via environment variables. The following environment variables can be used to configure the runner:
  • WMC_DEFAULT_MODE: The mode that the runner starts in. Currently supports RecordMany.
  • WMC_ADMIN_PORT: The port that the admin interface is exposed on.
  • WMC_API_TOKEN: The API token to use for accessing WireMock Cloud.
You will also need to publish the appropriate ports for the services defined in your environment file along with the port you have configured for the Runner. Here is a typical example on Linux or macOs when starting the Runner in RecordMany mode:
docker run \
  -e WMC_DEFAULT_MODE='RecordMany' \
  -e WMC_ADMIN_PORT='9999' \
  -e WMC_API_TOKEN='<wmc-api-token>' \
  -p 9999:9999 \
  wiremock/wiremock-runner:latest
The Runner will validate that the container is configured to run any of the available modes at startup regardless of the configured default mode.

Record Many Mode

The Runner can be started in RecordMany mode. This mode starts a multi-domain recording session as the runner starts up and will continue to record until the runner is stopped. More information on this can be found in the WireMock Runner Record Many documentation.

Limitations

  1. Currently, the only available mode is RecordMany.
I