Record Many Mode
The runner can be started inRecordMany
mode by setting the WMC_DEFAULT_MODE
environment variable to RecordMany
.
This mode starts a multi-domain recording session as the Runner starts up and will
continue to record until the runner is stopped.
Record Many Configuration
The record many session started by the Runner can be configured via the same mechanism as the WireMock ClI - either via a values file or via environment variables. More information on the configuration options can be found in the WireMock CLI documentation. Just like the WireMock CLI, by default the Runner will expect a WireMock environment file in the.wiremock
directory
in the current working directory of the container.
Flushing Recordings
TheRecordMany
mode will honour the batching configuration you
have specified in your config file. The Runner also defines an endpoint which can be used to flush the recorded requests
to WireMock Cloud independently of the batching configuration:
POST /v1/record-many/flush
Starting the Runner In Record Many Mode
When starting the runner inRecordMany
mode you will need to publish the appropriate ports
for the services you are running along with the port you have configured for the Runner.
Here is a typical example on Linux or macOs when running the Runner on port 9999
and recording to two Mock APIs: