People move. They leave home Wi-Fi, walk into a lift, step onto a train. Your app has to survive the network changing while a request is in flight. This script is meant to be handed to a tester; each step says what to do, what should happen and why.
Complements testing offline behavior, which covers having no network at all.
Before you start
- Use a phone with both Wi-Fi and a working mobile data connection.
- Sign in first, so you test a real session.
- Note the phone model, Android version and app build.
The script
- Wi-Fi to mobile, while idle. Open the app on Wi-Fi, then turn Wi-Fi off. Expect: the app keeps working on mobile data without a restart. Why: sockets bound to the old network can silently hang.
- Mobile to Wi-Fi, while idle. Reverse it. Expect: same. Why: some apps only handle one direction.
- Switch during a load. Open a long list or a screen that fetches data, and toggle Wi-Fi mid-load. Expect: either the content loads, or you see a clear error and a retry. Not an endless spinner.
- Switch during a form submit. Fill a form, tap send, switch network at once. Expect: a clear result. Then check the server side: no duplicate record, no lost data. Why: retries can double-submit.
- Switch during an upload or download. Use a photo or a file. Expect: it resumes or fails cleanly with a retry. A half-uploaded file should not appear as complete.
- Switch while signed in for a longer time. Stay in the app for several minutes, toggle, wait. Expect: the session survives. No unexpected sign-out. Why: a failed token refresh is often treated as "logged out".
- Airplane mode on and off. Turn it on mid-task and off again. Expect: the app notices the network returning and recovers without a restart.
- Weak signal. Move to a spot with poor reception, or use a throttled connection. Expect: timeouts end in a message, not a freeze.
- Background and return. Switch networks while the app is in the background, then return. Expect: data refreshes; there is no stale or broken screen.
- Data saver and metered connection. If your app syncs a lot, turn on Data Saver. Expect: behavior is sensible, with large downloads deferred or confirmed.
What to report
For each failure, ask the tester to write:
- the step number and what they did,
- what they saw (a screenshot or screen recording helps),
- the time it happened,
- how it ended: recovered by itself, needed a retry, needed a restart, lost data.
If you can, add a log. See adb basics.
Tips for the developer
- Retries should be limited and should wait longer between attempts.
- Make writes safe to repeat so that a retry cannot create a duplicate.
- Show the user when you are waiting for the network instead of showing nothing.
Part of the Android app testing guide. Related: keyboard and input test and TalkBack test script.
Want a tester to run this on a real phone? Start free and request private, structured feedback.