Q9 of 26 · Mobile QA
How do you test your mobile app under different network conditions — 3G, offline, and high latency?
Short answer
Short answer: On Android emulators, use the emulator's built-in network throttling or the Appium setNetworkConditions command. On real devices, route traffic through a proxy (Charles, Proxyman, mitmproxy) and apply throttling there, or use the device farm's built-in network conditioning feature.
Detail
Android emulator: the AVD network settings panel (or its command-line equivalent) lets you select a predefined profile (GSM, 3G, LTE) with specific bandwidth and latency. Appium's UIAutomator2 driver also exposes mobile: setConnectivity to toggle WiFi, data, and airplane mode programmatically — useful for offline-state tests.
Real devices via proxy: install a local proxy (Charles Proxy or Proxyman) on your test machine, configure the device to route traffic through it (WiFi proxy settings), then use the proxy's throttling feature to simulate slow or lossy connections. This works on any real device and any app.
Cloud device farms: BrowserStack and Sauce Labs support network profiles at the session capability level. You can specify a profile like 3G or offline in the capabilities and the farm handles the network conditioning on its end.
What to test: how the app behaves when requests time out (does it show a useful error or crash?), whether offline mode activates gracefully, whether cached content is served, and whether the app recovers when connectivity is restored — the "connection restored" path is often untested and frequently broken.