https://www.wiremock.io logo
Join Slack
Powered by
# help
  • d

    Deepak Jayakumar

    06/02/2025, 5:00 PM
    Hi Team - (Reposting)Would love to hear your thoughts on this. Request matching needs to separate out query params so we match only against the query param keys and not the values. Any suggestions on how to handle this? I tried Wiremock Extension to capture the stubs and modify the content with the regex but seems like its complicated. If I have 3 different query params and I need to match only the key for the first query param and leave the others.
    t
    • 2
    • 2
  • r

    Robbie Wareham

    06/04/2025, 9:36 AM
    Am I confusing myself here, or should it be possible to have a standalone wiremock server in docker (ie. wiremock/wiremock:latest) but then access the admin API using a C# client? Can I use the WireMock.Net.RestClient nuget or does that only work with a WireMock.Net docker service?
    l
    s
    s
    • 4
    • 5
  • j

    javaram

    06/14/2025, 7:09 AM
    Hi Team, Am facing an issue with wiremock. Have mocked couple of endpoints using wiremock and deployed it in docker. Am able to access the get and post endpoints through chrome and postman, could able to see the log messages generated in wiremock docker container. I have java application running in docker container, when it is hitting the mocked api endpoint not getting response/ error. Didn't find any trace in the wiremock logs. Would you please suggest me a documentation/ your comments on this.
    l
    • 2
    • 3
  • a

    Arpit Rege

    06/18/2025, 9:07 AM
    Hello Team , TIA Need help setting up xmx value in wiremock container in kubernetes , wondering what option should be used whether it is
    JAVA_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
    Copy code
    HTTP ERROR 500 java.lang.OutOfMemoryError: Java heap space
    l
    • 2
    • 6
  • t

    ty

    06/19/2025, 12:26 PM
    heya, when generating stub mappings for a recording,
    serveEventsToStubMappings
    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.
    t
    • 2
    • 3
  • l

    Linh Cao

    06/25/2025, 2:58 PM
    Hi, I'm trying to see if it's possible to record gRPC traffic using Wiremock. It seems to me that we would have to manually prepare the stubs (which is a pain). Any pointers will be greatly appreciated. Thank you!
    t
    • 2
    • 4
  • n

    Noah Ruben

    06/27/2025, 8:33 AM
    Hey, quick question about scenarios and the WireMock State extension: Is it possible to create a scenario per context? For example, I have an endpoint /foo/{ID} and ill get responses like: 1. Response: "First" 2. Response: "Second" 3. Response: "Third" 4. Response: "First" ... And so on But I need an option to have this per ID 1. (id=1) Response "First" 2. (id=1) Response "Second" 3. (id=9) Response "First" 4. (id=1) Response "Third" 5. (id=9) Response "Second" 6. (id=1) Response "First" 7. (id=3) Response "First" ... And so on
    t
    • 2
    • 4
  • c

    Chris McCown

    06/30/2025, 10:42 PM
    I’m using wiremock.net, and I'm trying to enable CORS when I start the docker container. I tried the --enable-stub-cors argument, and I tried setting an environment variable of CorsPolicyOptions=AllowAll, but I'm still getting a CORS error in the browser. Any idea what I'm doing wrong?
  • i

    Ina

    07/02/2025, 8:42 AM
    Hi, do I understand correctly that if I need to check if received request Soap body contains xml data valid according specific schema I need to implement request matcher extensions?
    l
    • 2
    • 3
  • l

    Linh Cao

    07/02/2025, 10:26 PM
    Hi, I was able to record gRPC traffic without mTLS. Now I have questions regards recording with mTLS. Can we use wiremock to record gRPC with mTLS? I tried to use
    https-keystore
    ,
    keystore-password
    ,
    https-truststore
    and
    trustore-password
    , but it doesn't seem to record anything. Thank you!
    t
    • 2
    • 3
  • u

    ģ†”ķ˜•ź·¼(Hyeongguen Song) /DnU

    07/04/2025, 7:13 AM
    Hi, Is there a way to disable WireMock’s Admin API requests completely?
    l
    • 2
    • 3
  • u

    22028033 Đào Huy Hùng

    07/07/2025, 6:08 AM
    Hi, is there a way to change the sample data when a specific request coming on wiremock.io?
    l
    s
    • 3
    • 9
  • r

    Raphaƫl GLAVIEUX

    07/08/2025, 9:06 AM
    Hi, I'm facing a strange issue. I'm upgrading our project to Java 21, SpringBoot 3.5 and gradle 8.14. I have set to use last stable version of wiremock : org.wiremockwiremock standalone3.13.1 I have a class that extends StringValuePattern:
    *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 ?
    l
    • 2
    • 1
  • c

    Cathleen Faith Tan

    07/10/2025, 11:54 AM
    Is there a way to remove a specific HTTP header from wire mock response?
    l
    • 2
    • 1
  • a

    Andrei

    07/10/2025, 8:38 PM
    Hello everyone. I use wiremock grpc extension with standalone wiremock instance. In .proto file I have something like
    map<string, any>
    . My response looks like
    Copy code
    "data": {
              "price": {
                "@type": "type.googleapis.com/google.protobuf.DoubleValue",
                "value": 0.00873388535031847
              }
            },
            "user": {
              "userId": "5235435"
            }
    But wiremock throw an exception:
    Copy code
    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?
  • d

    Daniel

    07/16/2025, 4:20 AM
    Hello everyone I am looking for an overload of docker registry, we are using azure acr for storing and pulling docker images and would like wiremock to try pull from acr and not docker hub while executing test. Can you please help?
    t
    • 2
    • 8
  • j

    Jush Jiang

    07/18/2025, 8:51 AM
    Hi, does anyone know how to enable logging for grpc requests? I've already enabled grpc extensions and also turned on --verbose, but still cannot see any grpc requests in the log.
    l
    • 2
    • 2
  • v

    Viteker

    07/21/2025, 6:02 PM
    Hi everyone, nice to join you. Could you help whether wiremock-grpc-extension supports bidirectional streaming with multiple responses?
    t
    • 2
    • 1
  • h

    Hariharasudan Muthukumar

    07/23/2025, 10:03 AM
    Hi everyone, am trying to create a mock for application/xml request. I need to initiate callback on request. Also, need to copy the parameters from original request to callback request. what handlers do I need to use?. am using a wiremock-standalone-3.13.1.jar version of wiremock. #C03N1E6HFPY
    t
    • 2
    • 10
  • h

    Hariharasudan Muthukumar

    07/24/2025, 12:50 AM
    One more question.. in "serveEventListeners" can I only use body? can't bodyfilename not supported in this version of wiremock ? I wanted to use for callback requests.. #C03N1E6HFPY
    l
    • 2
    • 3
  • s

    Slackbot

    07/24/2025, 7:18 PM
    This message was deleted.
    l
    w
    • 3
    • 2
  • s

    Slackbot

    07/24/2025, 7:23 PM
    This message was deleted.
    l
    w
    • 3
    • 2
  • a

    Aleksei Parfentjev

    07/29/2025, 7:06 PM
    Hi! I want to create 2 stubs for the same endpoint to validate service's behavior. So I decided to filter the incoming requests by a form param:
    Copy code
    wireMock.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
    t
    • 2
    • 3
  • p

    Paulo Lory

    08/06/2025, 10:24 AM
    Hello, I’m using the latest version of WireMock-GO and trying to configure a response with "WithJSONBody". However, I’m having trouble passing a JSONPath helper inside the body template. Is there a way to include JSONPath helpers in a WithJSONBody response or other method? Here’s the error I’m getting: "build stub request error: json: unsupported type: func(string, interface {}) (string, error)" I suspect this happens because WithJSONBody is marshalling the template as JSON and treats the helpers as unsupported types. What is the recommended approach to return a JSON body that contains WireMock helpers like {{jsonPath ...}}?
    l
    m
    • 3
    • 4
  • s

    Suresh

    08/08/2025, 8:23 AM
    Unable to disable gzip in WireMock Docker – container exits immediately when using
    --no-gzip
    Description:
    I'm running WireMock via Docker and trying to disable gzip compression because my client needs uncompressed responses.
    I've tried:
    1.
    Setting the environment variable:
    docker run -d \ --name wiremock \ -p 8080:8080 \ -e WIREMOCK_NO_GZIP=true \ wiremock/wiremock:latest …but the responses still contain
    Content-Encoding: gzip
    . 2. Passing
    --no-gzip
    as a CLI flag: docker run --rm -it \ -p 8083:8080 \ wiremock/wiremock:3.9.1 \ --verbose --no-gzip …but the container immediately exits with: Exception in thread "main" java.util.MissingResourceException thrown from the UncaughtExceptionHandler in thread "main" 1. 3. Using older versions (e.g.,
    2.35.0
    ) with
    --no-gzip
    results in:
    Copy code
    pgsql
    Copy code
    joptsimple.UnrecognizedOptionException: no-gzip is not a recognized option
    W*hat I’ve confirmed:* • Docker image pulls and runs fine without
    --no-gzip
    . • Problem only occurs when trying to disable gzip. • Removing containers and images before retrying doesn’t fix it. Questions for the community: • What is the correct way to disable gzip in the latest WireMock Docker image? • Is
    --no-gzip
    supported in the official Docker images, and if so, from which version? • Could the
    MissingResourceException
    be a packaging issue in recent releases?
    l
    • 2
    • 1
  • t

    Thomas Stein

    08/12/2025, 4:05 PM
    Hey everyone, It is possible to use WireMock in Cluster mode? I tried this and configured multiple replicas in my Kubernetes Cluster. Besides this did I bound the
    /mappings
    and
    /files
    folder with a shared storage to each other. This work very well, but the other instances did not refresh the instance caches with the stored mappings. Is there a configuration/setting that could help in this case?
    l
    • 2
    • 3
  • m

    mei n

    08/13/2025, 3:15 AM
    Hello Team ! Is it possible to generate a stub server from an OpenAPI specification using the WireMock standalone JAR? I noticed that this option is available in WireMock Cloud, but I couldn’t find a similar feature in the standalone JAR.
    l
    • 2
    • 4
  • j

    Joe Williams

    08/13/2025, 6:33 PM
    Hello! I'm having what I think is a silly issue, but I can't figure it out. I'm seeing errors from my local app saying
    java.io.FileNotFoundException: /home/wiremock/./__files/responses
    which makes sense because it seems like that path is incorrect. The problem is I can't figure out how to correct it. I've defined wiremock in my docker compose (defined at
    .docker/compose.yml
    as follows:
    Copy code
    wiremock:
        image: wiremock/wiremock:3.12.1
        container_name: wiremock
        ports:
          - "3000:8080"
        volumes:
          - ../wire-mock:/home/wiremock
        entrypoint: ["/docker-entrypoint.sh", "--global-response-templating", "--disable-gzip", "--verbose"]
    my wiremock directory is a top level directory at
    wire-mock
    in the project Any help would be greatly appreciated. thanks y'all
    l
    j
    • 3
    • 9
  • t

    Timur Sataev

    08/18/2025, 10:36 AM
    Hi there! I have some troubles with wiremock, for example, when it returns a 500 error. but the response to the embedded answer is returned correctly. And I am a complete newbie in using this tool. Can you please tell me how and where the application logs are saved?
    l
    • 2
    • 3
  • c

    Celina Kincaid

    08/21/2025, 4:44 PM
    Hello! We are looking for a contractor to help us with our wiremock mapping project for our 100+ API calls across various financial cores. We are a platform on Pega so Pega experience is a must. Is there someone here with this experience or any recommendations?
    b
    • 2
    • 4