Questions tagged [wiremock-standalone]
119 questions
1
vote
0 answers
Using wiremock to proxy/record calls to AWS Cloudfront service
We have a container-based service running in AWS ECS with the front end hosted by AWS Cloudfront, and authorization handled by AWS Cognito. I'm trying to configure Wiremock to be a proxy for this service so I can record the calls and mappings to…

pll
- 116
- 1
- 5
1
vote
0 answers
Wiremock request body matchingJsonPath throwing exception
I am trying to verify that the POST call made to downstream service has the correct body/value, but getting a null exception.
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
import static…

noobgrammer
- 11
- 1
1
vote
0 answers
Why doesn't wiremock match against my header?
I run Wiremock as a standalone image, one of several started by docker-compose. It works fine in most cases but in one case the matching is not working how I had hoped. I define my routes in a routes.json file. This is the relevant snippet:
...
…

RogerParkinson
- 499
- 6
- 18
1
vote
0 answers
Nested JSON on WireMock Response
Is there any way to dynamically include JSON from the request body in the response?
Input Request
{
"id":"1234",
"message":"{\"key\":\"value\"}"
}
Expected Output
{
"status":"CREATED",
"id":"1234",
"message":"{\"key\":\"value\"}"
}
The…

Naveen Kumar
- 75
- 1
- 7
1
vote
1 answer
Wiremock - dynamic mapping of response values
I am attempting to use Wiremock standalone with global response templating to dynamically map an input value (user id) with a response value (username).
My issue in summary is: unable to fetch a value from transformerParameters.* dynamically.
I have…

Franco
- 53
- 5
1
vote
1 answer
Is there any way to create a JSON request mapping on WireMock to match a list of two different items having n number of elements?
I have create a Wiremock JSON mapping file as follows:
{
"request": {
"method": "POST",
"url": "/some/thing",
"bodyPatterns": [
{
"equalToJson": {
"items": [
…

aqa mustafa akhlaqi
- 11
- 2
1
vote
1 answer
WireMock set path as dynamic+
so i have this stub ive created
stubFor(get(urlEqualTo("/skyhost/v1/rms/resourceid/8471jd1da7362f0eb28642s2"))
.willReturn(aResponse().withStatus(200)
.withBodyFile("getstub.json")
.withHeader("Content-Type", "application/json")));
}
what i wane…

Samian
- 11
- 1
- 4
1
vote
1 answer
WireMock not matching regex with negative lookahead
I'm currently facing an issue when trying to get my standalone WireMock to match a GET request with a certain path pattern using a regex with a negative lookahead:
{
"request": {
"method": "GET",
"urlPathPattern":…

Martin H.
- 538
- 1
- 7
- 21
1
vote
0 answers
how to fix request matching Date time error in query params wiremock
Why am i getting request match error in wiremock
"request": {
"method": "GET",
"urlPath": "/abc/v1",
"queryParams": {
"FromDate": {
"equalToDateTime": "now -1 months",
"actualFormat": "dd/MM/yyyy",
…

aron
- 17
- 1
- 4
1
vote
1 answer
Running Wiremock in HTTPS mode with Keystore
I am trying to create an HTTPS mocks using wiremock to test an external call.
Initially I tried to run the wiremock by providing the --https-port tag and set it as 8443. I was able to access localhost:8443/__admins in this case. But when I tried to…

Sooraj
- 73
- 8
1
vote
1 answer
can I block mappings changes via API in WireMock standalone?
TLDR: Is there a way to disable whole or part of the Stub Mappings API (i.e. disable POST/PUT/DELETE to '/__admin/mappings')? Let's assume I want to do it on Wiremock instance level, not a proxy server level.
In my company we use the WireMock server…

DailyFrankPeter
- 382
- 1
- 13
1
vote
0 answers
WireMock drops zeros at the end of decimal values
I might need to mock an API that returns JSON containing, among other things, a value in the format of decimal with 0 at the end. No quotation marks, so something like {"some":"stuff", "balance": 1000.0}. However when I create a stub with jsonBody…

FoxMulder
- 11
- 2
1
vote
0 answers
Wiremock queryParameters regex not working but does match outside wiremock
I'm using java -jar wiremock-jre8-standalone-2.32.0.jar --verbose
Here is my mapping
{
"priority":1,
"request":{
"method":"GET",
"urlPath":"/api/arsys/v1/entry/CHG:Infrastructure%20Change",
"queryParameters" : {
"q":…

DannyK
- 267
- 2
- 12
1
vote
1 answer
Wiremock customize recording and playback
I am using Wiremock for stubbing the service. So that I can continue working on client application while service is down. I am recording the request and response by creating the proxy to service and using the recordings while service is down.
Their…

Alok Bakshith
- 11
- 1
1
vote
1 answer
Docker Container with Wiremock could not find stub mappings
Link to the Repo:https://github.com/wiremock/wiremock-docker
I'm getting an error when I try to access stubs, not sure if I'm missing anything here. Can I know if the below command is correct ?
docker run --rm -d -p 8080:8080 -p 8443:8443 --name…

itgeek
- 549
- 1
- 15
- 33