Questions tagged [wiremock]

Library used for stubbing and mocking web services.

Wiremock is a library written in Java by Tom Akehurst. It is used for stubbing and mocking web services. It supports HTTP response stubbing, request verification, proxy/intercept, record/playback of stubs and fault injection, and can be used from within a unit test or deployed into a test environment.

For more information see http://wiremock.org

894 questions
0
votes
2 answers

Wiremock Hystrix failure on upgrade

We have a few tests using wiremock, using rule: @Rule public WireMockRule rules = new WireMockRule(PORT); It is an old app and used wiremock version 1.7. Now that we upgraded it to the 2.4.1, some of the tests fail. The actual Http Query is…
Arash
  • 11,697
  • 14
  • 54
  • 81
0
votes
0 answers

Is RestTemplate implicitly using a proxy? How could I tell?

I'm testing a Java REST client using Wiremock, specifically how it handles an empty response. Code under test: public Content makeRequest(...) { try { ResponseEntity response = restTemplate.exchange(...); …
slim
  • 40,215
  • 13
  • 94
  • 127
0
votes
3 answers

Spawning process in background on Jenkins - job that won't stay in queue

I want to make job on Jenkins that starts server (MockServer on WireMock). Server is launched from *.jar file, from terminal like that. java -jar serverLaunch.jar It takes over my console. To avoid that I modify this and do: java -jar…
F1sher
  • 7,140
  • 11
  • 48
  • 85
0
votes
0 answers

Java WireMock automated testing with generated files

I just run standalone version of WireMock to catch my requests and corresponding responses from multimodule project in Java EE. Now I have these (thousands) files in folders __files and mappings. I have many of tests with a lot of requests so I…
stanly
  • 123
  • 1
  • 8
0
votes
1 answer

I'm trying to bind an address in the PowerShell script

I'm trying to bind an address in the PowerShell script so my testers can run wiremocks and it automatically points to the correct environment when they run it. echo "Running WireMock" $WiremockFileName = "wiremock-standalone-2.1.12.jar" $Port =…
AngularM
  • 15,982
  • 28
  • 94
  • 169
0
votes
1 answer

WireMock unexpectedly returning Null

While using WireMock to mock an endpoint that is expected to return JSON, I have come across a problem where it will not return the expected JSON. Querying WireMock for its stubs will reveal the correct JSON at the expected endpoint. While running…
Tott
  • 11
  • 1
  • 4
0
votes
1 answer

wiremock soap ws-policy support?

I am wondering if anybody knows if wiremock has support for WS-Policy in regards to SOAP webservices? What I'm after is to give wiremock a WSDL that has some WS-Policy in it, that contains the "reciepe" for what the response should look like. Ie…
Joel Pearson
  • 1,622
  • 1
  • 16
  • 28
0
votes
2 answers

can i mock a SOAP and rest webservice reponses with file stream from local directiry

I have a requirement to mock webservice call. Here instead of actual webservice call to dummy server and server should reply my response xml response file from local directory.
Dan
  • 11
  • 1
0
votes
1 answer

WireMock for datadriven mocks?

I would need a standalone server against which I can mock my REST endpoints. The requirements are: - needs to run standalone - needs to be able to respond with a specific response message based on the incoming request message Would WireMock be the…
user1340582
  • 19,151
  • 35
  • 115
  • 171
0
votes
2 answers

How to simulate a class using WireMock?

I have a class AMSClient, which I want to simulate using WireMock. I have seen some examples but I couldn't understand them, as they are using port numbers. Can any one tell me how to simulate a class using WireMock.
Sat
  • 3,520
  • 9
  • 39
  • 66
0
votes
1 answer

Wiremock 1.57 returning Eof Exception when multiple endpoints are added

I have two stub endpoints added in wiremock. Below is the output of http://localhost:56789/__admin { "mappings": [ { "request": { "urlPath": "/encryption/v1/decrypt/", "method": "GET" …
tuk
  • 5,941
  • 14
  • 79
  • 162
0
votes
1 answer

Not able to access _admin in WireMock

I am using the standalone jar of WireMock on CentOS. Starting the server is fine but when I am trying to access the mapping files using the url: http://localhost:8090/_admin I am getting the error: HTTP ERROR 404 Problem accessing…
Anurag
  • 723
  • 3
  • 13
  • 31
0
votes
1 answer

Deploy a web application that depends on standalone application

I have a web application (JSF), which uses two web services (REST). Pending the achievement of these web services, I use mocks (WIREMOCK). By deploying the application, I have to start both mocks calling main methods. Is there a way to group these…
andolsi zied
  • 3,553
  • 2
  • 32
  • 43
0
votes
0 answers

Exec command line in Node-Webkit

I'm creating a desktop manager for Wiremock. Wiremock is a standalone executable jar that reads mock mappings from a dir named "mappings" placed in the same jar directory and starts a http server in localhost. I have created some mappings (.json…
Héctor
  • 24,444
  • 35
  • 132
  • 243
0
votes
1 answer

Mockserver -Replay

I am using JamesDBloom Mockserver. I looking at enabling a standalone instance which can be used by developers to test the external calls. This requires feature of being able to record and replay without any deployment - code changes. While I was…
Gayathri Rao
  • 37
  • 1
  • 7