-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] What is the correct configuration for wiremock running in proxy mode #580
Comments
Basically i need to know the setting for .net can you please tell me the correct setting for the below in .net version. This serves my purpose because when the live url is down wiremock knows to call its mappings and return them. Plus when live url is up it will call the live url automatically |
What you mean is that you actually want a "smart" proxy mode: Scenario 1 Scenario 2 If the mapping is found, return that mapping. About the Record-Mode for proxy : I'm not sure yet if this fits in this solution.... |
Reason I am asking that most of the developers want their automation test suite to always hit the live url , but when the live url is down it is ok to return the wiremock stubs already created maching the request. But we don't need the automation test always running and returning the stubs which we have created in wiremock when the live url is up. So I am simply asking do you have a solution which serve my purpose in wiremock.net Thanks. Appreciate for your time on this matter. |
Hello @genesispvtltd, Short answer: WireMock.Net does not yet support a "Smart Proxy" functionality as you describe. Long answer: This can probably be implemented as defined here: Scenario 2 If the mapping is found, return that mapping. |
@StefH thanks for the response I am good.cool |
Can this question be closed for now? |
yeah sure |
Hi I am new to wiremock but I need to know the answers to the following questions. I have a automation test suite running against an api. Sometimes this api is not available then I need automation test to be run against wiremock server and this should happen automatically I mean wiremock should be intelligent enough to understand the live url is down and it will call the stubs allready created. I tried wiremock standalone version and this is not happening. I started the wiremock on proxy mode and the live url is up and running I sent a request and it does hit live url, and then next I block the live url using the windows host file. I restareted wiremock and I again sent the request to wiremock server running in proxy mode but it fails and send me "No connection could be made because the target machine actively refused it." please help me to understand why I am facing this issue.Basically when the live url is down then i need 12345 to be return. Also the live url endpoint is nothing but it will create a new random number and will return that number. Below is my code also please understand I am using csharp code to write my stubs and i want them to be added as static mappings as well so I am doing it in the code like below
The text was updated successfully, but these errors were encountered: