Hello. I want to use Wiremock to mock several part...
# help
v
Hello. I want to use Wiremock to mock several parties. Let's say I have a payment service and there's integration with several PSP - Paypal, Ingenico, etc. So I want to use Wiremock to mock Paypal and Ingenico. I have a dedicated test environment to run my e2e autotests on it. Should I put 2 independent instances of Wiremock there? I.e., paypal-mock.mydomain.local and ingenico-mock.mydomain.local? What if I have 50 dependencies? Do I need to run 50 Wiremocks? Is it possible to mock 50 dependencies with one instance of Wiremock? I can route requests to different mappings with URL path or some header, but it doesn't seem to be a good solution (unnecessary changes to my app code). And I don't have any idea, how to route requests in other way.
b
Hi Vadim On our side, our apps can be configured with environment variable to tell it where to find the third party servers it rely on As it’s not hardcoded in the app, it enable us to tell our app at startup to look for all its third parties APIs on the same Wiremock server, but with distinct extra specific prefixes
and the rest of the paths are hardcoded in the app itself if give a great deal of flexibility in such a case