Is it possible to set a fixed response time for a ...
# help
o
Is it possible to set a fixed response time for a stub? My service response time is approximately 100 ms. I want it to respond in 2000 ms. My aim is to eliminate that service response time in performance testing. Delay is not a solution because it add delay to the response time, so 100 + 2000 and 2100 in total.
m
This might help you https://wiremock.org/docs/simulating-faults/ We use this for fixed delay in response like giving 500ms delay for each request.
Copy code
{
  "request": {
    "method": "GET",
    "url": "/delayed"
  },
  "response": {
    "status": 200,
    "fixedDelayMilliseconds": 2000
  }
}
o
Yes, I know this feature. But what I want is get the same response time in every call. So, instead of delay a constant time should be injected.
anyone who has an answer?
No answer but let me give a solution to this. I wished to get a 50 ms average response time. My response transformer extension class that builds the whole response had a 15 ms processing duration. So I set a fixed 35 ms delay. This way, I could achieve a 50 ms average time. Our aim was specify an average response time of our visualized external service so we could isolate the external service and measure the performance of the desired real service.