WireMock connection


How to get the mobile application under test to connect to the WireMock server we bootstrap when we launch our functional tests? Is there a mechanism that passes the wiremock servers address and port to the mobile app to route APIs we want to mock?


Most likely something needs to change within the app itself. i use wiremock and we can change the environment in the app to MOCK which changes the base url to the address and port wiremock is running on. We can change this environment through a launch argument or within the app itself. These require code changes in the app.

If you absolutely can’t make changes to the app you could potentially have a proxy server sitting on the device that redirects traffic?

We are considering a custom test version of the app that will prompt for additional environment variables to override the defaults at launch.

I was hoping appium had this covered with a feature already, but see no evidence of that.