Much of this post will not make sense if you are testing a web-only app. It’s likely that some of what I share here is irrelevant to you, and some of it is just my strongly held opinion, take it with some lemon and salt and a mariachi band is my opening advice.
OK, now that the band is playing in the background, I’ll start. We do use the iOS built in network throttle tool, and the Android throttly tool Throttly for Android - App Download not free, but costs less than a hamburger. The biggest troubles however is that the tools limit all traffic, so any automated tools and “webdriver” automation platforms fall over in a CI/CD context, so you end up with limited manual time. and at that point it becomes easier to use that time doing real life simulations, not scripted testing. Also be aware that toggling wifi on/off is NOT a valid test, that is because it actually tears down the network stack. You may have done this when testing your app on your PC, unplugging the cable does the same thing, it notifies the network stack that the LAN is down, that notification instantly terminates most kinds of network connections, most. And it is thus a very poor simulation of a network outage, just don’t use it as a test, it’s akin to testing if a car starts with no battery, it’s not a useful test.
Hybrid apps
If you have a purely web app, your life is easier, but if like me you are testing something that is not just a browser on a piece of wet string things change a lot.
We all work from home, now right? We do a story/technique here sometimes where we grab a team mate and get them to be the tech support guy or get them to be another user, both of you log into the “platform” while on a teams call (other collaboration tools exist), and drive through the use of the app while walking around in the park, or just your back yard. I have a shed outside with a metal roof, blocks signal like a charm. You could use the network limiter instead of walking about in real life, but the limiter limits your real lived experience, and can distract you because changing the limit means backgrounding your app briefly, which is another kettle of fish altogether. So choose a profile and stick to it. We use the 4G profile as a check of the worst usable experience, although I prefer to also give 3G profiles a go with a end-to-end. It does pass, but you need more time, so you cannot buddy on the 3G experience test.
I do not bother with API level tests, here is why: Environments can become non-trivial, the journey touches 3 or more different web services, and for most testers they are complicated to set up, run on 3 VM’s and editing the bootstrapping of a mobile app to point to a environment you can intimately control with a signed secure binary is no joke. All comms is encrypted and the time spent installing certificates to look at API call timings is not worth it when our app has pretty decent network logging anyway. So that’s an easy win for people I hope, get the devs to add logging.
User experience for native apps… well if you have an iphone you will notice a little toast thing sometimes appearing warning that you have no internet sometimes? Well, that is driven via the OS, it provides apps with a way to detect network disconnection is likely. Apps can feed that status back in the UI. Some browsers do, some don’t. Some apps do, your app should! This warns the user to quickly move to a better reception spot before their page or operation times out. Apple decide that your network is flakey differently to how Google/Android do, and if your app is designed to work off-grid or behind a firewall, that API indicator may not be useful in your context. But whatever your app does, it needs to warn people in a consistent way. Yesterday we found one small part of the journey in which it does not warn the user.
There are more things you do need to test with fresh eyes on mobile, but I hope this story has given people some ideas to make their lives easier for native and hybrid app testing.