wiremock Questions
3
Overview:
I used wiremock standalone 2.1.11 and did the following to enable HTTPS URL for my request but to no avail:
Studying the doc http://wiremock.org/docs/running-standalone/
Adding --ht...
3
Solved
Also shared here: https://github.com/tomakehurst/wiremock/issues/625
I'm writing an integration test to verify that my application that interacts with a REST API handles unsuccessful requests appro...
Casie asked 8/3, 2017 at 0:49
8
I am working to setup wiremock for springboot rest api and using rest assured and spring-cloud-starter-contract-stub-runner from spring cloud. when i run the sample integration test i encounter mod...
Tallu asked 5/5, 2022 at 11:17
6
Solved
I have an integration test for a spring boot micro-service. The problem is that the service calls an external service (via REST) on startup. I’m using WireMock to mock the call. Spring makes the ap...
Gibbet asked 2/1, 2018 at 18:25
5
I encountered a very strange situation when using Spring and Wiremock for integration testing: suddenly, one specific test started failing intermittently. A snippet of the error below:
org.springfr...
Moorman asked 25/8, 2021 at 19:48
2
I have used wiremock for testing http calls, but my current work requires websockets and I was wondering if anyone has found/used a library for standing up a localhost that will create a websocket ...
4
Solved
When upgrading my Spring Boot 2.5 to 3.0 , I am facing some issues with Wiremock, probably due to the move to jakarta namespace. Even upgrading to latest wiremock-jre8 , ie 2.35.0 (as of december 2...
Hoyos asked 4/12, 2022 at 8:38
3
Solved
I am facing an issue that Wiremock says my URLs don't match even though they are the same. Obviously I am missing something. What am I doing wrong?
WireMock.stubFor(WireMock.get(WireMock.urlPathEq...
2
Given the following unit test, I can easily test if a request of a particular url has been made. Is there a way to do the opposite, verify that a request of a particular url has NOT been made?
i....
3
Solved
I'm trying to use WireMock in my JUnit tests to mock calls to an external API.
public class ExampleWiremockTest {
@Rule
public WireMockRule wireMockRule = new WireMockRule(9999);
@Before
pu...
4
Solved
I have defined a https stub in wiremock as follows:-
public class HttpsMockMain {
public static void main(String[] args) {
WireMockServer mockServer = new WireMockServer(56789, 8443);
addStub(m...
Pelham asked 1/5, 2016 at 10:48
4
Solved
I have this piece of code in a Junit, where I clearly set the port to 8888
when(clientUtils.getLinkUrl(eq(HOSTELS_MICROSERVICE.name()), eq(HOSTELS_MICROSERVICE.name()), anyMap()))
.thenReturn("ht...
Blueberry asked 23/8, 2019 at 12:9
1
Solved
What I have achieved so far?
I'm using WireMock with Spring Boot Application using the JUNIT 5.
I am stubbing the test endpoint with the custom Request and Response JSON payload:
REQUEST PAYLOAD:
{...
Vicechancellor asked 12/6, 2023 at 10:17
4
Wiremock Documentation states that the location of the file specified in withBodyFile should be in src/test/resources/__files. I would like to have file in src/test/resources/Testing_ABC/Testcase2/...
5
I am using wiremock to mock github api to do some testing of my service.
The service calls github api. For the tests I am setting endpoint property to
github.api.endpoint=http://localhost:8087
...
Arlie asked 19/3, 2018 at 23:39
9
Solved
I have a Spring Boot test that uses wiremock to mock an external service. In order to avoid conflicts with parallel builds I don't want to set a fixed port number for wiremock and would like to rel...
Hawsehole asked 9/2, 2018 at 14:2
4
I'm using Wiremock for my tests in a Spring Boot app. I can't seem to get the logging to not output all debug logs, which makes my test runs very verbose.
I see it use SLF4J on startup:
DEBUG w...
Shanda asked 9/6, 2017 at 14:52
2
I'm using @AutoConfigureWireMock(port = 0) to init mock server.
This is the setup class written in Kotlin:
@AutoConfigureWireMock(port = 0)
@SpringBootTest(
webEnvironment = SpringBootTest.WebEnvi...
2
Solved
I have implemented a basic WireMock with a sample REST/HTTP request simulation. The server code implemented as below.
With this code, I get the following error when I issue the GET request from P...
3
I'm new inWireMock. I am running the WireMock server as a standalone process. I am able to mock simple rest api, by configuring json files under /mappings folder. Now, I want to mock a file downloa...
Segno asked 22/5, 2017 at 18:24
2
I am trying to understand what is the difference between two frameworks which are MockServerClient( or org.mockserver.integration.ClientAndServer) and WireMockServer?Can they be exchanged? I read t...
Martini asked 9/8, 2019 at 0:15
3
Solved
I am trying to hit the WireMock with following stub but it seems that the query param is not getting matched. Here is the response:
Request was not matched
=======================
-------------...
Mala asked 4/12, 2019 at 12:34
3
I'm facing an issue on only one platform when I'm trying to execute mvn clean install. As part of the build we compile multiple component and last we execute functional testing using wiremock. It i...
Nildanile asked 22/3, 2021 at 6:32
5
Solved
I know that it can simulate SocketTimeoutException by using withFixedDelay, but what about ConnectionTimeoutException?
3
Solved
Wiremock logs that the following request not matches:
WireMock : Request was not matched:
{
"url" : "/api/accounts?username=defaultuser",
"absoluteUrl" : "http://localhost:11651/api/accounts?u...
Cuspidation asked 22/7, 2017 at 8:51
1 Next >
© 2022 - 2025 — McMap. All rights reserved.