982 questions
0
votes
1
answer
102
views
WireMock.Net is throwing an exception: "An error occurred while sending the request"
WireMock.Net seems to be incompatible with Microsoft.Owin.Security.Interop.
Consider the following .csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<...
0
votes
0
answers
37
views
How to make wiremock server logs the file containing the stub mapper used in a response? [duplicate]
I have got a wiremock server in java. It contains several .json files to returns answer for each request. Something like
file1.json
{
"mappings": [
{
"request": {
...
2
votes
4
answers
118
views
How can I get request.query.size as empty value instead of length of the structure when the query parameter isn't sent
I am trying to dynamically generate a list with N entities, the quantity can be set using the query parameter size as the following GET /search?size=15. I want to set a default value for it when the ...
0
votes
1
answer
341
views
wiremock AutoConfigureWireMock HttpHostConnectException: Connection refused
@ActiveProfiles("it")
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ContextConfiguration(classes = ServiceApplication.class)
@AutoConfigureWireMock(port = 0)
@...
0
votes
1
answer
42
views
How to configure Wiremock to work with AVD?
I'm trying to setup wiremock standalone in the way to record all requests from certain api on my android emulator with steps below:
Launching wiremock on machine with:
java -jar wiremock-standalone-3....
0
votes
0
answers
56
views
How to test aync Spring WebClient with WireMock?
Whenever I have a client in my Spring Boot application I use WireMock for integration testing. Works very well.
I now have to implement an async client for which I am using WebClient, but my typical ...
1
vote
1
answer
189
views
Connection handling problems when repeatedly starting server on ephemeral port
In the following scenario:
In a loop:
construct and launch server
construct client and make a request
print response code
cleanup server and client
I am seeing occasional timeouts and rarely other ...
0
votes
1
answer
291
views
What's the deal with url and urlPattern in WireMock?
I use WireMock to stub the following URL to an external service: /users/{username}/repos. The official docs says that using regexes is discouraged
note Using the Path and query regex is generally not ...
0
votes
0
answers
186
views
What's the right way to configure the directories with WireMock?
My resources tree is
src/test/resources/
├── application-test.yml
└── wiremock
├── __files
│ ├── github-repo-branches.json
│ └── github-user-repos.json
└── mappings
├── ...
1
vote
1
answer
57
views
Integrating wiremock with node for google oauth flow
I am trying to mock google oauth flow with wiremock in my nodejs app for integration tests.
I have configured in my passport manager code:
passport.use(new GoogleStrategy({
clientID: config....
0
votes
0
answers
64
views
Where does wiremock.net-alpine bodyFileName files need to be mounted?
This is what my current docker compose looks like, wanting to mock a service where the mappings are mounted to /app/__admin/mappings and files that are used in bodyFileName are mounted to/app/__admin/...
0
votes
0
answers
98
views
Is it possible to use come context-path for Wiremock/Wiremock-UI
I am trying to use holomekc/wiremock-gui:3.x.x-alpine version as a Docker base image to create Docker file with wiremock UI. And my problem is that seems there is no way to set up some context-path in ...
0
votes
0
answers
36
views
Typecasting the response from the date time function to a number
I am using the same function - "ts":"{{now offset='1 months' format='epoch'}}". The Response I get is "ts":"1749708866319".
I need the response as a number ...
1
vote
1
answer
56
views
Why are files baked into my image not available when deployed in an app service container?
I'm trying to deploy a custom image to an app service in azure.
Incidentally it's based on a wiremock image and simply copies some configuration files to be used at runtime.
When I docker build and ...
0
votes
1
answer
97
views
Wiremock sending error response while running test suit
I run Wiremock as a standalone server by using below parameters.
java -Xms2048m -Xmx2048m -Dhttp.keepAlive=true -jar wiremock-standalone-3.12.1.jar --max-request-journal-entries 300 --global-response-...