Connecting Android Emulator with Wiremock Standalone

83 Views Asked by At

I am trying to set up a mock environment for my mobile app using Wiremock by running the standalone jar running on port 8080.

  • The server is up, the files and mappings folders are created, and I have the mapping files which I can see when I hit http://localhost:8080/__admin/.
  • AVD is launched, I have changed the proxy settings to add a proxy to localhost:8080 and it shows success.
  • The wifi setting on the emulator is also updated to use proxy as localhost:8080.

But as soon as I do that, I see an error 'Connected to device, can't provide internet' and when I launch my app, it's neither able to connect to the internet nor I am seeing any requests being sent to Wiremock for matching.

I am stuck here and can't seem to find any solutions/documents to explain this connection process.

Note: the entire process is done black-box and not programmatically - that is, I am not trying to interact with Wiremock from my app code - Kotlin or Espresso.

0

There are 0 best solutions below