ReferenceIntermediate4-6 min reference
Mobile Network Conditions
Mobile apps run on flaky networks — tunnels, lifts, crowded cells, airplane mode. The classic bugs are infinite spinners, lost data, and crashes on reconnect. This sheet lists the conditions to cover and how to simulate them. It pairs with Mobile Testing and Flaky Test Debugging (linked below).
Conditions to cover
| Condition | What it exposes |
|---|---|
| Offline / airplane mode | Offline messaging, cached content, queued actions |
| Slow (2G/3G, high latency) | Spinners, timeouts, perceived performance |
| Packet loss / unstable | Retries, partial loads, duplicate requests |
| Network switch (Wi-Fi ⇄ cellular) | In-flight requests, session continuity |
| Captive portal (hotel/airport Wi-Fi) | "Connected but no internet" handling |
| Reconnect after offline | Sync, queued writes, conflict resolution |
| Backgrounded during request | Request completion / cancellation |
How to simulate
- iOS: Network Link Conditioner (Developer settings) for profiles (3G, Edge, 100% loss).
- Android: emulator network speed/latency settings;
adbto toggle radios. - Charles / Proxyman: throttle and introduce latency on real devices.
- Airplane mode + Wi-Fi toggling for the simplest offline/reconnect tests.
What to verify
- Clear offline messaging — not an infinite spinner.
- Timeouts fire with a retry option, not a hang.
- Actions taken offline queue and sync on reconnect (no data loss, no duplicates).
- No crash when a request is interrupted mid-flight or the app backgrounds.
- Cached content still renders offline where promised.
Common mistakes
- Testing only on fast office Wi-Fi.
- Spinner with no timeout → looks frozen forever.
- Losing or duplicating an offline action on reconnect.
- Crashing when the network drops mid-request.
- Ignoring the Wi-Fi⇄cellular handoff that breaks long uploads.
// Related resources