Questions tagged [wiremock-standalone]

119 questions
1
vote
0 answers

How to verify requests from Wiremock deployed to a remote host based on it's URL only?

I've implemented a custom Wiremock Server programmatically using Spring Boot and this service is deployed and running on a remote host. The only way to access this Wiremock Server is URL provided by DevOps. Let's say testWiremockHost.com All…
1
vote
1 answer

How to implement multi-stub in one json file for the same url using Wiremock?

I am trying to create one mapping.json under the mappings folder with multiple stubs as below. But I am facing the following error Wiremock: v2.5.1 (standalone) Mapping.json file looks, [ { "scenarioName": "Savings account Stub", "request": { …
1
vote
1 answer

get a particular object from jsonBody with query param of request url in wiremock

What should be the mapping object if 1) I need to pass my query 2) the query should be used to send one object out of an array of objects curl -X POST --data ' { "request": { "url": "/jsons?id=someID", "method": "GET" }, "response":…
adhi narayan
  • 310
  • 2
  • 11
1
vote
0 answers

Unable to record the soap request in wiremock using JAVA api

I am trying to record the soap request via wiremock JAVA API,tried to record by using the below code but I couldn't see any stub mappings files in the mapping folder,Please help me…
Anant patil
  • 161
  • 1
  • 9
0
votes
0 answers

Wiremock standalone - Fetching values from request xml for a mock Soap service

I've been trying to create a stub system for a SOAP service using wiremock standalone. I've got the response.xml s ready and I'm required to return them based on an id value in the SOAP request xml. For example, Soap Request:
KevinPB
  • 35
  • 7
0
votes
0 answers

how to rename Request and response files generated by wire-mock Proxy server(node.js) in mapping and __file folder

Can anyone tell me how to rename Request and response files generated by wire-mock Proxy server(node.js) in mapping and __file folder . I Tried creating Wiremock config file and js file to rename these files but its not working .
Ankit
  • 1
0
votes
1 answer

Why is this wiremock setup based on wireMockConfig not working?

Why is this wiremock setup based on wireMockConfig not working? package com.example.wiremockjunitstandalone; import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.ok; import…
CodeBot
  • 33
  • 5
0
votes
1 answer

How to inject filed in JSON object using Handlebars in Wiremock response templating

Wiremock docker image: wiremock/wiremock:2.35.0. I am using docker image of Wiremock server, and I need to create a mock for custom response based on the request's body. Futhermore, I need to add a custom field in the response. Handlebars doesn't…
0
votes
0 answers

Randomize `status` value

I'm trying to randomize the status returned by a Wiremock (version 2.33.2) endpoint. Ideally, my configuration would be something like this: { "mappings": [ { "request": { "method": "PATCH", "urlPattern":…
Simone
  • 11,655
  • 1
  • 30
  • 43
0
votes
1 answer

How to use Proxy All in WireMock Cloud?

The Local Standalone JAR has an option of --proxy-all, but I am looking for the equivalent in the WireMock Cloud service. I want any paths that I haven't mocked to be proxied to the base URL of the live or production environment. Can someone advise…
dsf
  • 1,203
  • 1
  • 6
  • 11
0
votes
0 answers

Setting up multiple ports in WireMock docker set up

Hey guys I'm trying to set up my wiremock docker container to have multiple services running on different ports. Ex. 8083 for service A, 8084 for service B... however, regardless of how i config, 1 port seems to default to the listening port, would…
0
votes
0 answers

wiremock adding multiple mapping directories

My Java application creates a wiremock to a mapping directory. final var baseDir = System.getProperty("user.dir"); final var mappingsDir = baseDir + "/src/test/resources/wm-mappings/app1"; Under app1 I have another folder called…
user1555190
  • 2,803
  • 8
  • 47
  • 80
0
votes
0 answers

Spring Boot WireMock 404 while execute jar

I'm having a serious problem with Spring Boot and Wire Mock. When I run the Application through IntelliJ Idea and hit sample url (http://localhost:8088/mtn-mock-service/hello) then I am able to see response 'Hello!World' and Status code 200. but I…
0
votes
1 answer

Wiremock returns 200 OK response even if transformer not found

If I accidentally make a typo in stub definition JSON and transformer name doesn't match I still get a 200 response. It's unexpected and is a problem. Is there any way to make Wiremock to fail or at least log that transformer was not found? I'm…
Aleksandr Kravets
  • 5,750
  • 7
  • 53
  • 72
0
votes
0 answers

Apache Camel: exchange.getIn().getBody(String.class) and properties.get(HTTP_RESPONSE_TEXT) inconsistent between 2xx and 404

I am testing with Wiremock and Apache Camel, while status code is different(2xx and 404), even Wiremock is configured to return nothing (no withBody() stubbing), the body I get…
WesternGun
  • 11,303
  • 6
  • 88
  • 157