7 ways to Simulate Low Network Speed to Test Your Mobile App [2023]
11.6.2022
·
Обновлено
8.8.2024
When testing mobile apps, newbies QA frequently forget to check the app with an unstable Internet connection. But in many cases this is critical: connection speed directly influences user experience and workability of the main functions. It is especially true for applications where geolocation and mobile Internet are heavily in use. For example, video chats, messengers, and other multimedia products we specialize in.
In this article, we’ll show how to simulate slow Internet connection on a test device with no hassle.
Network Link Conditioner
Let’s start with a standard utility Network Link Conditioner for iOS apps testing. It lets the QA adjust the Internet connection as they need.
To switch on this function on iPhone, you need a MacOS device:
iOS lets us choose one of pre-installed presets of connection quality – or create our own preset.
For our own preset these settings are available:
Here we see that Apple took care of testing apps with different levels of connection quality and gave us almost all the needed settings.
Having got acquainted with Network Link Conditioner for iOS, we’ve been sure such a feature would be on Android too. God, how much we’ve been mistaken.
Network Link Conditioner on Android
It appeared to be impossible to emulate a slow or unstable connection on a real Android with the help of standard tools. Therefore, I faced 2 paths: download some apps from Google Play that emulate slow connection, or use a specifically precise adjustment of the Internet connection access point.
Apps didn’t work out for me ☹ All the apps that give this function require Root access, and this breaks the concept of testing in real-world conditions.
So, having left the Root access as the last resort, I decided to look closer at path #2 — adjustment of the access point.
In the past, when I was a student, mobile internet traffic was ending up quickly (and we needed to read, watch something while on the lesson), and we used an iPhone as an access point. The idea came to mind: to mix the student experience and recently gathered knowledge.
Using Network Link Conditioner and an access point made of macOS or iOS doesn’t require any extra knowledge and are easy to adjust. Exactly what’s needed if we want to save time.
So, to emulate bad connection on Android we need and Android device and… an iPhone with mobile internet Developer Tools switched on.
Make iPhone the access point (Settings > Mobile Data > Personal Hotspot)
Adjust connection with Network Link Conditioner
Connect to the access point with the Android device
Ready. You’re awesome 🙂
Cloud device farms
You don’t have to own a device farm to test an app on a wide range of mobile devices. It’s also quite inconvenient if you or your employees mostly work remotely. We started using cloud device farms, and let us tell you — it’s a big gamechanger. You should try it for better mobile testing.
Some farms (e.g. Browserstack or LambdaTest) allow connection throttling — artificial connection slowdown — for testing on mobile devices.
It might require a paid subscription to throttle the connection. For Browserstack the individual plan price starts from $29.
Android emulator testing
Another way to simulate slow connection is to use an emulator. It’s software for a PC that copies another OS. Android emulator imitates the performance of a real smartphone, so you can test your mobile app on it if you don’t have an actual device.
Testing on emulators could never compare to testing on real devices but it’ll do for the first development stages.
With Android studio emulators you can set the limit based on the cellular type (LTE, EDGE, etc.). Each type has its own speed limitations (in kbps):
3. When creating / editing the emulator pick the cellular type:
Tap Show advanced settings
Select speed in the Network section
4. Run the emulator
5. Launch your app in the emulator
6. Turn off the WiFi on the emulator for it to use cellular connection settings
Changing cellular type in the device settings
You can pick a certain cellular type on an actual Android or iOS device. To do that you’ll also need a SIM-card with Internet access.
How to switch to another network on an Android device?
Go to Settings
Then Network & Internet
Open Internet
Go to SIM settings
Tap Preferred network type
Works for Android 12. Section names and placings may differ depending on the device and OS version.
How to switch to another network on an iOS device?
Go to Settings
Then to Mobile Data
Open Mobile Data Options
Tap Voice & Data
Works for iOS 15.
Bandwidth throttling in web debugging tool Charles
If cloud farms are expensive, launching an emulator is complicated, and you don’t have any SIM, you can use the network throttling function in Charles.
Basically, you can use Charles to keep track of the mobile devices traffic when you carry out functional testing or debugging. But you can also use it to simulate slow internet connection for testing.
How to imitate slow connection with Charles?
Setup your host machine with Charles installed as a proxy for the device and the app you’re testing. Learn more about it from the Charles documentation.
When in Charles go to Proxy > Throttle settings
Tap Enable Throttling
Select the speed limitation preset or set it up manually
Save the settings
Click Proxy > Start throttling
Throttling the speed in the router settings
You can also go for a radical way and throttle the speed in your router settings. It will definitely work if you test your app at home, on a real device, and you have access to the router admin panel. Keep in mind that having such an option depends on the router.
How to throttle the connection on a router?
Go to the router settings. To do that, enter the special URL or the router IP in the address bar of your browser (192.168.1.1 or 192.168.0.1)
Enter login and password. You can find them on the router itself (usually both are “admin” by default)
Open the Bandwidth control section
Don’t forget to cancel the limitation once you’re done 🙂
Conclusion
There’re many ways to test an app and fake bad internet connection. The most convenient one, at least for us, is Network Link Conditioner. But you’re free to choose the best for yourself.
Tested everything, it all worked out? Don’t forget to report on it 🙂
Cообщение не отправлено, что-то пошло не так при отправке формы. Попробуйте еще раз.
e-learning-software-development-how-to
Jayempire
9.10.2024
Cool
simulate-slow-network-connection-57
Samrat Rajput
27.7.2024
The Redmi 9 Power boasts a 6000mAh battery, an AI quad-camera setup with a 48MP primary sensor, and a 6.53-inch FHD+ display. It is powered by a Qualcomm Snapdragon 662 processor, offering a balance of performance and efficiency. The phone also features a modern design with a textured back and is available in multiple color options.
this is defenetely what i was looking for. thanks!
how-to-implement-screen-sharing-in-ios-1193
liza
25.1.2024
Can you please provide example for flutter as well . I'm having issue to screen share in IOS flutter.
guide-to-software-estimating-95
Nikolay Sapunov
10.1.2024
Thank you Joy! Glad to be helpful :)
guide-to-software-estimating-95
Joy Gomez
10.1.2024
I stumbled upon this guide from Fora Soft while looking for insights into making estimates for software development projects, and it didn't disappoint. The step-by-step breakdown and the inclusion of best practices make it a valuable resource. I'm already seeing positive changes in our estimation accuracy. Thanks for sharing your expertise!
free-axure-wireframe-kit-1095
Harvey
15.1.2024
Please, could you fix the Kit Download link?. Many Thanks in advance.
Fora Soft Team
15.1.2024
We fixed the link, now the library is available for download! Thanks for your comment
Comments