Questions tagged [wiremock-standalone]
119 questions
0
votes
3 answers
Docker Container with Wiremock does not refresh changes from volume
I have created this Dockerfile and copied it into /my/project/wiremock directory, based on the samples from https://github.com/rodolpheche/wiremock-docker:
FROM openjdk:8-jre-alpine
ENV WIREMOCK_VERSION 2.27.1
RUN apk add --update…

Ara Kokeba
- 149
- 1
- 4
- 15
0
votes
0 answers
WireMock Scenarios - partially modify response mapping for concurrent requests
I'm using WireMock as a standalone service configured via JSON. Say I have an app where you can create, delete, and view notes. I'd like to test concurrent access to it, so my tests would have multiple threads exercising the app. My goal is to have…

doowop
- 21
- 3
0
votes
2 answers
Wiremock UI to connect to locally running Wiremock standalone server
I have downloaded the wiremock standalone jar locally. And I am starting the standalone server using below command.
java -jar wiremock-jre8-standalone-2.26.3.jar --port 8089 &
I am placing all the mocked endpoints under the mappings folder.
I need…

Piyush Kothari
- 41
- 1
- 7
0
votes
1 answer
Wiremock Return Success or Error Response from the same JSON Mapping
I am very new to Wiremock and even though I've went through the docs I still haven't wrapped my head around it completely.
What I'd like to find out is...
Is there a way to define in 1 stub two behaviours - a success response case and an error…

KDX2
- 945
- 2
- 14
- 31
0
votes
1 answer
Pushing mocks to remote wiremock server fails with "JSON Parsing" Error
I am trying to post mappings to a remote server from a spring application. What I found while debugging is that my JSON gets converted to "StubMapping" and this is the place where the code is failing with the following error.
Error creating bean…

Bilbo Baggins
- 2,899
- 10
- 52
- 77
0
votes
1 answer
Wiremock-Problem while accessing multiple stubs in a single json file with wiremock body transformer jar
Exception in thread "main" com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "mappings" (class com.github.tomakehurst.wiremock.stubbing.StubMapping), not marked as ignorable (10 known properties: "response",…

Badari Nath
- 1
- 1
0
votes
1 answer
Create single WireMockServer object with single port
I am very new to Wire mock and gradle. I am planning to setup by using single WireMockServer object with using 8081 port and its configurable in gradle task.
build.gradle
plugins {
id 'org.springframework.boot' version '2.2.6.RELEASE'
id…

amarbogari
- 21
- 3
0
votes
1 answer
Wiremock json stub for https calls
I wanted setup https call as json configuration stub in wiremock.
What are the additional configuration need top provide?
I have below json config
{
"id": "177a103d-85e4-4688-acd6-acc8a97ce085",
"name": "provider_rest_push",
"request": {
…

Shabar
- 2,617
- 11
- 57
- 98
0
votes
1 answer
Request body matching with XML declaration in Wiremock-standalone
I have a stub described in the ./mappings/*.json file.
"request": {
"method": "POST",
"url": "/some/thing",
"bodyPatterns" : [ {
"matchesXPath" : {
"expression": "//nodeA/text()",
…

jazzyekim
- 101
- 1
- 10
0
votes
1 answer
SSLHandshakeException when connecting to Wiremock with my own self-signed cert
I'm running a stand-alone instance of Wiremock for mocking in JUnit tests. This works fine with http and if I use the wiremock self-signed cert with the switch --https-port 8443. If I specify --https-keystore server_keystore.jks however, any attempt…

SeeNoWeevil
- 2,549
- 4
- 26
- 39
0
votes
0 answers
Wiremock stubbing initialisation error in Cucumber java with restassured
I am trying to get simple stubbing with Wiremock (standalone) in Cucumber Java with RestAssured.
I have the below code in stepdefinition class
protected final int PORT = 8089;
@Rule
public WireMockRule wiremockRule = new…

Shabar
- 2,617
- 11
- 57
- 98
0
votes
1 answer
Wiremock standalone dynamic response array of objects is not working with bodyPatterns and matchesJsonPath
I am using wiremock to stubbing the requests. I have created a json file to get a response:
{
"request": {
"method": "POST",
"urlPath": "/nested/transform",
"bodyPatterns": [
{
…

Vijayr32
- 81
- 2
- 10
0
votes
1 answer
How to encode special characters in Wiremock request body?
I'm using Wiremock server to mock responses and using JSON format to mock responses.
{
"request":
{
"url": "/token",
"method": "POST",
"bodyPatterns" : [{
"contains":…

user10179187
- 99
- 1
- 1
- 6
-1
votes
1 answer
Wiremock record apis return with "We're sorry but isp-portal doesn't work properly without JavaScript enabled. Please enable it to continue"
I try to evaluate WireMock to mock a third-party service.
When trying to record some calls to the third-party service.
I am issuing a call to the actual service e.g.
curl -X GET…

Haim Raman
- 11,508
- 6
- 44
- 70