A mobile app is almost never tested the way it is used. In a test lab it runs on a freshly installed build, on office Wi-Fi, on a phone with plenty of free memory, with nobody calling. In real life it is used on a Mumbai local train that loses signal between stations, interrupted by an OTP message and a phone call, pushed to the background while the user checks WhatsApp, killed by the operating system to free memory, and upgraded from a version installed eight months ago. Three families of tests target this gap: interruption testing, network condition testing and upgrade testing.
Interruptions: what the app does when it loses the user’s attention
An interruption is anything that takes the app out of the foreground or changes its environment mid-task. The common ones:
- Incoming phone or video calls, alarms and timers.
- Notifications and SMS, including the OTP the app itself requested.
- The user switching to another app, then returning minutes or hours later.
- Screen lock, rotation, split-screen and changes to system font size or dark mode.
- Low battery warnings, battery saver turning on, headphones or Bluetooth devices connecting.
- Permission revoked from system settings while the app is in the background.
The question for each is the same: after the interruption, is the user back where they were, with their data intact, and is the app in a consistent state? A loan application form with 14 fields filled in that resets to blank after a phone call is a real and common bug.
The most important case is the least visible: process death. When an app is in the background, Android (and to a lesser degree iOS) may kill its process to reclaim memory. When the user returns, the system recreates the screen, and the app must restore its state from what it saved. On a developer’s high-end phone this rarely happens, so the bug survives until it meets a budget phone with 3 GB of RAM. Android’s developer options include a “Don’t keep activities” setting that destroys each screen as soon as you leave it; turning it on is a quick way to reproduce many state-restoration bugs. Rotation, which recreates the screen on Android unless the app handles it otherwise, catches a similar class of issue.
Timing matters too. An interruption during a payment is the classic high-risk case. If the user is sent to a UPI app, approves the payment, and the original app has been killed in the meantime, does it find out the payment succeeded when it restarts? Or does it show “payment failed” while money has left the account?
Network conditions: slow, flaky and missing
Mobile networks are not just “online” or “offline”. They are slow, they spike in latency, they drop packets, and they switch between Wi-Fi and mobile data. Useful conditions to test:
- No connection at app start, and lost mid-action.
- Slow connection with high latency, simulating a weak 4G signal or congested network.
- Intermittent connection, where requests sometimes succeed and sometimes time out.
- Handover from Wi-Fi to mobile data during a request.
- Captive portals, such as railway station or hotel Wi-Fi that is connected but returns a login page for every request.
Tools include the network shaping options in the Android emulator, Apple’s Network Link Conditioner, proxy tools such as Charles that can throttle or fail specific requests, and network profiles offered by device clouds. Physical testing still has value: a tester walking through a basement car park with the app open will find things simulators miss.
What to look for: does the app show a clear message instead of an endless spinner? Does it retry sensibly rather than hammering the server? Are user actions queued or clearly rejected, never silently dropped? Most importantly, is there any action that can be duplicated by a retry? If a “place order” request times out on the client but succeeded on the server, a naive retry creates a second order. The server should use idempotency keys for such requests, and testers should deliberately create this situation by cutting the network just after a submit.
Upgrades: the test case nobody runs on a fresh install
Every test run on a freshly installed build misses a whole category of bugs, because real users rarely install fresh. They upgrade, often skipping several versions, and they bring local data with them: a local database, cached files, saved preferences, stored login tokens, downloaded content.
Upgrade testing means installing an older production version, using it to create realistic data, then installing the new version over it and checking that everything still works. The areas that break most often:
- Local database migrations. If the new version changes the schema of the on-device database, the migration must run correctly from every supported old version, not just the previous one. A user upgrading from three versions back exercises a migration path that may never have been tested.
- Session and authentication. Do users stay logged in? If the token format changed, are they logged out gracefully or stuck in a crash loop?
- Preferences and feature flags. Settings renamed or removed in the new version can produce defaults that surprise users, such as notifications quietly turned back on.
- Pending work. Items queued offline in the old version, such as unsent messages or draft forms, should survive the upgrade.
- Forced update flows. If the backend no longer supports old versions, the old app must show a clear upgrade prompt rather than failing with cryptic errors.
A practical approach is to keep the builds of the last few production versions available, decide which upgrade paths are supported (for example, from any version released in the last 12 months), and test at least the oldest and the most common paths for each release that changes local storage. The backend side matters too: during a staged rollout, old and new app versions talk to the same APIs at the same time, so API changes must stay backward compatible until old versions are retired.
Making these tests routine
Some of this can be automated: Appium and native frameworks can background an app, rotate the device and toggle connectivity on emulators, and upgrade tests can install one build over another in a pipeline. Much of it still benefits from a short, structured exploratory session on real devices before each release, with a checklist of interruptions and network states. The aim is not to test every combination but to make sure the app has been used, at least once per release, the way a commuter on a patchy network actually uses it.
Written by the RP Strativa Team. The scenarios in the examples are illustrative.
Leave a Reply