Wiremock Commandline Parameters
The following commandline arguments can be defined for:
Settings
Section titled “Settings”| Argument Name | Value Type | Default | Description |
|---|---|---|---|
--Help |
Show a link to this page. | ||
--Port |
integer | settings-port | |
--Urls |
string | http://*:9091/ |
settings-urls. Used when --Port is not set and no --HostingScheme is defined. |
--StartAdminInterface |
boolean | true | Defines whether to start admin interface. |
--AdminPath |
string | /__admin |
settings-adminpath |
--AdminUsername |
string | settings-adminusername | |
--AdminPassword |
string | settings-adminpassword | |
--AdminAzureADTenant |
string | settings-adminazureadtenant | |
--AdminAzureADAudience |
string | settings-adminazureadaudience | |
--AllowPartialMapping |
boolean | false | settings-allowpartialmapping |
--AllowBodyForAllHttpMethods |
boolean | false | settings-allowbodyforallhttpmethods |
--AllowCSharpCodeMatcher |
boolean | false | settings-allowcsharpcodematcher |
--AllowOnlyDefinedHttpStatusCodeInResponse |
boolean | false | settings-allowonlydefinedhttpstatuscodeinresponse |
--ReadStaticMappings |
boolean | false | Defines if the static mappings should be read at startup. |
--WatchStaticMappings |
boolean | false | settings-watchstaticmappings |
--WatchStaticMappingsInSubdirectories |
boolean | false | settings-watchstaticmappingsinsubdirectories |
--DisableJsonBodyParsing |
boolean | false | settings-disablejsonbodyparsing |
--DisableRequestBodyDecompressing |
boolean | false | settings-disablerequestbodydecompressing |
--DisableDeserializeFormUrlEncoded |
boolean | false | settings-disabledeserializeformurlencoded |
--HandleRequestsSynchronously |
boolean | false | settings-handlerequestssynchronously |
--DoNotSaveDynamicResponseInLogEntry |
boolean | false | settings-donotsavedynamicresponseinlogentry |
--SaveUnmatchedRequests |
boolean | false | settings-saveunmatchedrequests |
--MaxRequestLogCount |
integer | settings-maxrequestlogcount | |
--RequestLogExpirationDuration |
integer | settings-requestlogexpirationduration | |
--StartTimeout |
integer | 10000 | settings-starttimeout |
--HostingScheme |
enum | settings-hostingscheme | |
--UseHttp2 |
boolean | false | settings-usehttp2 |
--UseRegexExtended |
boolean | true | settings-useregexextended |
--QueryParameterMultipleValueSupport |
enum | All | settings-queryparametermultiplevaluesupport |
--Culture |
string | CurrentCulture | settings-culture |
--ProtoDefinitions |
json | settings-protodefinitions | |
--GraphQLSchemas |
json | settings-graphqlschemas | |
--WireMockLogger |
string | WireMockNullLogger |
You can also define WireMockConsoleLogger. |
--X509StoreName--X509StoreLocation--X509StoreThumbprintOrSubjectName--X509CertificateFilePath--X509CertificatePassword |
string string string string string |
settings-certificatesettings | |
--CorsPolicyOptions |
enum | None | settings-corspolicyoptions |
--ClientCertificateMode |
enum | NoCertificate | settings-clientcertificatemode |
--AcceptAnyClientCertificate |
boolean | false | settings-acceptanyclientcertificate |
Proxy Settings [Optional]
Section titled “Proxy Settings [Optional]”See also Proxy and Record Settings for a complete list.
| Argument Name | Value Type | Default | Description |
|---|---|---|---|
--ProxyURL / --ProxyUrl |
string | The URL to use for proxying. | |
--SaveMapping |
boolean | false | Save the mapping for each request/response to internal mappings. |
--SaveMappingToFile |
boolean | false | Save generated mappings to file. |
--SaveMappingForStatusCodePattern |
string | * |
Save mapping filter by status code pattern. |
--UseDefinedRequestMatchers |
boolean | false | Use defined request matchers for generated mappings. |
--AppendGuidToSavedMappingFile |
boolean | false | Append a GUID to saved mapping filename. |
--PrefixForSavedMappingFile |
string | mapping |
Prefix for saved mapping filename. |
--AllowAutoRedirect |
boolean | false | Proxy requests should follow redirects. |
--ClientX509Certificate2ThumbprintOrSubjectName |
string | Client certificate thumbprint or subject name. | |
--ExcludedHeaders |
string[] | Headers to exclude in recorded mappings. | |
--ExcludedCookies |
string[] | Cookies to exclude in recorded mappings. | |
--PreferProxyMapping |
boolean | false | Prefer proxy mapping when applicable. |
--ProxyAll |
boolean | false | Proxy all requests. |
--WebProxyAddress |
string | Upstream web proxy address. | |
--WebProxyUserName |
string | Upstream web proxy user name. | |
--WebProxyPassword |
string | Upstream web proxy password. | |
--ProxyUrlReplaceOldValue |
string | Proxy URL replace old value. | |
--ProxyUrlReplaceNewValue |
string | Proxy URL replace new value. | |
--ProxyUrlReplaceIgnoreCase |
boolean | false | Case-insensitive URL replace. |
--ProxyUrlReplaceTransformTemplate |
string | URL transform template. | |
--ProxyUrlReplaceTransformerType |
enum | Handlebars | Transformer type for URL transform template. |
Handlebars Settings [Optional]
Section titled “Handlebars Settings [Optional]”| Argument Name | Value Type | Default | Description |
|---|---|---|---|
--AllowedCustomHandlebarsHelpers |
enum | None | Allowed custom Handlebars helpers. |
--AllowedHandlebarsHelpers |
enum[] | defaults | Allowed built-in Handlebars helpers. |
Activity Tracing Settings [Optional]
Section titled “Activity Tracing Settings [Optional]”| Argument Name | Value Type | Default | Description |
|---|---|---|---|
--ActivityTracingEnabled |
boolean | false | Enable activity tracing for requests. |
--ActivityTracingOptions__Enabled |
boolean | false | Alternative key to enable activity tracing. |
--ActivityTracingExcludeAdminRequests |
boolean | true | Exclude /__admin/* requests from tracing. |
--ActivityTracingOptions__ExcludeAdminRequests |
boolean | true | Alternative key for excluding admin requests. |
--ActivityTracingRecordRequestBody |
boolean | false | Include request body in trace attributes. |
--ActivityTracingOptions__RecordRequestBody |
boolean | false | Alternative key for request body recording. |
--ActivityTracingRecordResponseBody |
boolean | false | Include response body in trace attributes. |
--ActivityTracingOptions__RecordResponseBody |
boolean | false | Alternative key for response body recording. |
--ActivityTracingRecordMatchDetails |
boolean | true | Include mapping match details in trace attributes. |
--ActivityTracingOptions__RecordMatchDetails |
boolean | true | Alternative key for mapping match detail recording. |
WebSocket Settings [Optional]
Section titled “WebSocket Settings [Optional]”| Argument Name | Value Type | Default | Description |
|---|---|---|---|
--WebSocketSettings.MaxConnections |
integer | 100 | Maximum number of WebSocket connections. |
--WebSocketSettings.KeepAliveIntervalSeconds |
integer | implementation default | WebSocket keep-alive interval in seconds. |