1

my app is sending some http request, and I want during test step to get all requests and responses. In browser I was used BrowserMobProxy to get all responses but it's look like it's work just on browser. Is some one know how can I get responses from app in test step ?

SelenUser
  • 638
  • 5
  • 13

1 Answers1

0

You can re-route all connections through a proxy running on your development PC. Note that I assume that you have a local Wifi router and a local network both your computer and the Android phone are connected to.

All you need is that the IP of your development PC is accessible from the Android phone you use for app testing.

On the PC install a inspection proxy like Fiddler (Windows), Burp Suite (Java) or Charles proxy (OSX).

By default most proxies only listen on localhost connection, but they can be configured to accept connections from other computers (or in this case an Android phone).

For Fiddler you find it in menu Tools -> Fiddler Options -> Tab Connections -> Allow remote computers to connect.

Configure it accordingly and then change the Wifi setting on the Android phone for the used Wifi network. Enable the manual proxy configuration and enter your computer's IP address in your local network and the port number the proxy is listening on. After saving the new Wifi settings all apps on the Android phone should use the proxy on your PC, which will allow you to see also the traffic of your app.

Robert
  • 39,162
  • 17
  • 99
  • 152