Benoit LEFEVRE -CAMPUS-
05/23/2025, 1:17 PMWireMockExtension
I’ve noticing that whenever the json to return is designated with a bodyFileName
that points to a missing file, this error have WM server still returning an answer, but in text/html content type, with the call stack in the HTML body
It’s somehow a bit puzzeling because whenever no stubs match the requested ressource, an error is produced in the log console ... if we use a ConsoleNotifier
to get extra WM informations while tuning our test’s mocks
Is there any way to configure the WM extension in order to also have the missing files exceptions being reported on the console ?Deepak Jayakumar
05/27/2025, 5:59 PMVishnu
05/28/2025, 10:43 AMPieter Hagedoorn
05/28/2025, 1:39 PM{
"name": "aanroep splunk geeft 200 OK",
"priority": 5,
"request": {
"urlPath": "/nl.bkwi.audit.log.grpc.v0100.AuditLog_v0100Service/AuditLogRequest",
"method": "POST"
},
"response": {
"status": 200,
"headers": {
"content-type": "application/grpc",
"grpc-status-name": "OK"
},
"body": "{\"message\": \"hi\"}",
"transformers": [
"response-template"
]
}
}
Pieter Hagedoorn
05/28/2025, 1:40 PMgrpcurl -plaintext \
-d '{"key":"message1", "arguments":["argument1","argument2"]}' \
-proto AuditServiceV1.proto \
-import-path target/protoc-dependencies/ec4b3d39b9b3c3f5186cf878d88e0a4e/nl/bkwi/specification/proto \
-H "X-correlation-id: 1" -v\
localhost:8088 nl.bkwi.audit.log.grpc.v0100.AuditLog_v0100Service/AuditLogRequest
Resolved method descriptor:
rpc AuditLogRequest ( .nl.bkwi.audit.log.grpc.v0100.AuditLogRecord ) returns ( .nl.bkwi.audit.log.grpc.v0100.AuditLogResponse ) {
option (.google.api.http) = { post: "/AuditLog_v0200/AuditLogRequestV2" };
}
Request metadata to send:
x-correlation-id: 1
Response headers received:
content-type: application/grpc
grpc-status-name: OK
matched-stub-id: 5e78e4f5-d7b9-4dd6-8e90-3bd1b7e84b29
matched-stub-name: aanroep splunk geeft 200 OK
Response trailers received:
(empty)
Sent 1 request and received 0 responses
ERROR:
Code: ResourceExhausted
Message: grpc: received message larger than max (577594739 vs. 4194304)
Pieter Hagedoorn
05/28/2025, 1:41 PMJesus Perez
05/29/2025, 2:07 PMwiremock-standalone.jar
), configured to act as an HTTPS proxy using:
--https-port 8443 --enable-browser-proxying
I noticed that WireMock generates a dynamic self-signed CA, and exposes the root certificate at:
/__admin/certs/wiremock-ca.crt
This works fine, I can trust the CA in my clients and avoid SSL errors when intercepting HTTPS traffic. However, I'm looking for a way to
use a custom or persistent CA, so I don’t have to re-export and re-trust the CA every time WireMock restarts...
Does anyone know if there's a way to:
1. Provide a custom CA in standalone mode?
2. Or at least reuse a previously generated CA?
I’m aware this can be done when embedding WireMock as a Java library (caKeystorePath
, etc.), but I’d prefer to keep using the standalone JAR if possible.
Thanks in advance!Deepak Jayakumar
06/02/2025, 5:00 PMRobbie Wareham
06/04/2025, 9:36 AMjavaram
06/14/2025, 7:09 AMArpit Rege
06/18/2025, 9:07 AMJAVA_MEM_OPTS
or JAVA_OPTS
Context :
Although the overall memory utilisation is not even 60% of the container as i set the mem limit to 400Mib in resources under k8 but it is giving me OOM error when hitting it
HTTP ERROR 500 java.lang.OutOfMemoryError: Java heap space
ty
06/19/2025, 12:26 PMserveEventsToStubMappings
in the Recorder generates the stub mappings from the serve events in reverse-chronological order, and thus passes them to the transformer in reverse-chronological order. is this expected and/or intentional? is it something that you'd accept a patch for? alternatively, is there an existing extension point to customize this order?
i'm writing an extension that matches & propagates data through the sequence of requests. it depends on being able to capture data from requests earlier in the chronology to match that data in requests later in the sequence, so it's a bit of a show-stopper for me 😅. i can think of a hack or two (probably storing all the stub mappings passed to the transformers in a list of my own, figuring out when the last call happens, and re-sorting/processing them all during that final call) but i'd like to avoid it if possible.Linh Cao
06/25/2025, 2:58 PMNoah Ruben
06/27/2025, 8:33 AMChris McCown
06/30/2025, 10:42 PMIna
07/02/2025, 8:42 AMLinh Cao
07/02/2025, 10:26 PMhttps-keystore
, keystore-password
, https-truststore
and trustore-password
, but it doesn't seem to record anything. Thank you!송형근(Hyeongguen Song) /DnU
07/04/2025, 7:13 AM22028033 Đào Huy Hùng
07/07/2025, 6:08 AMRaphaël GLAVIEUX
07/08/2025, 9:06 AM*import* com.fasterxml.jackson.annotation.JsonProperty;
*import* com.github.tomakehurst.wiremock.matching.MatchResult;
*import* com.github.tomakehurst.wiremock.matching.StringValuePattern;
import
*static* com.github.tomakehurst.wiremock.common.Strings._normalisedLevenshteinDistance_;
public
*class* EqualVinOutInAnyOrderPattern *extends* StringValuePattern {
*public* EqualVinOutInAnyOrderPattern(@JsonProperty("equalVinOutInAnyOrder") String expectedValue) {
*super*(expectedValue);
}
@Override
*public* MatchResult match(String actual) {
return
*new* MatchResult() {
...
}
}
This class is now failing when the constructor calls the getName()
When I debug I well see a this.getClass().getDeclaredConstructors()[0].getParameterAnnotations()[0][0] instanceof JsonProperty
with the correct value, but the execution still goes to the throw Exception.
Does anybody have the same issue or have an idea of what happens ?Cathleen Faith Tan
07/10/2025, 11:54 AMAndrei
07/10/2025, 8:38 PMmap<string, any>
. My response looks like
"data": {
"price": {
"@type": "type.googleapis.com/google.protobuf.DoubleValue",
"value": 0.00873388535031847
}
},
"user": {
"userId": "5235435"
}
But wiremock throw an exception:
wiremock.com.google.protobuf.InvalidProtocolBufferException: Cannot resolve type: type.googleapis.com/google.protobuf.DoubleValue at wiremock.com.google.protobuf.util.JsonFormat$ParserImpl.mergeAny(JsonFormat.java:1511) at wiremock.com.google.protobuf.util.JsonFormat$ParserImpl.access$2000(JsonFormat.java:1276) at wiremock.com.google.protobuf.util.JsonFormat$ParserImpl$1.merge(JsonFormat.java:1343) at wiremock.com.google.protobuf.util.JsonFormat$ParserImpl.merge(JsonFormat.java:1432) at wiremock.com.google.protobuf.util.JsonFormat$ParserImpl.parseFieldValue(JsonFormat.java:1995)
Any clue what's wrong?Daniel
07/16/2025, 4:20 AMJush Jiang
07/18/2025, 8:51 AMViteker
07/21/2025, 6:02 PMHariharasudan Muthukumar
07/23/2025, 10:03 AMHariharasudan Muthukumar
07/24/2025, 12:50 AMSlackbot
07/24/2025, 7:18 PMSlackbot
07/24/2025, 7:23 PMAleksei Parfentjev
07/29/2025, 7:06 PMwireMock.stubFor(<http://WireMock.post|WireMock.post>("/convert")
.withFormParam("amount", WireMock.equalTo("10.50"))
.willReturn(responseDefinition1));
wireMock.stubFor(<http://WireMock.post|WireMock.post>("/convert")
.withFormParam("amount", WireMock.equalTo("12.50"))
.willReturn(responseDefinition2));
However, the amount
can easily be 10.5
or 12.5
due to inconsistent precision, and that doesn't work - 10.50
and 10.5
are different strings. I solved this by extending StringValuePattern
and overriding it's matcher which now converts both values to BigDecimal
and compares them with compareTo
.
My concern is that I perhaps overengineered this and missed a simpler solution. Is there one to compare decimal values in form params?
I only found a similar issue with JSON bodies: https://github.com/wiremock/wiremock/pull/2588