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:

  1. Download and install Xcode for Mac
  2. Open Xcode on Mac
  3. Connect iPhone to Mac
  4. Allow Mac access iPhone
  5. Open Settings on iPhone
  6. Scroll down
  7. Tap Developer
iPhone settings
iPhone settings
  • Tap Network Link Conditioner
Developer section setting options
Developer section setting options
  • Pick network preset or create your own
  • Switch on the Enable toggle
Developer section interface and enable toggle
Enable toggle in Network Link Conditioner

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:

Settings for preset connection quality
Settings for preset connection quality

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.

Using NetGuard to simulate slow connection on Android

NetGuards is an Android app that allows control of internet access for different apps and manages connection parameters including connection speed. It doesn’t require root access which makes it easy to use for testing different network conditions

Installing NetGuard

  1. Download the NetGuard app from Play Store
  2. Open the app

Setting up NetGuardStep 1. Enabling VPN access

  • Enable NetGuard with the switch located at the top of the home screen
  • NetGuard will ask for permission to manage VPN connections on first launch. Allow VPN management in the app.

Step 2. Setting up a network profile

  • Open Settings (Click on triple-dot menu and select Settings).
  • Find and open the network profile

Step 3: Setting Up Speed Limits

In the Bandwidth section, enable the Speed Limit for Wi-Fi and mobile data. Set speed values for incoming and outgoing traffic. For example:

  • 2G: 50-100 kbps
  • 3G: 300-500 kbps
  • 4G: 1-2 Mbps

Set a connection delay to simulate unstable or slow networks. For example, you can add a 200-400 ms delay for a more realistic experience.

Step 4: App-Specific Settings

  • On the main screen of NetGuard, a list of installed apps will be displayed. Tap on the app you are interested in.
  • Open the app settings and set the speed limits for it.
  • You can also block internet access for a specific app if you want to test its offline mode.

Testing Functionality

  • Launch the app for which you have set speed limits and check its behavior under the simulated slow connection.
  • Observe the data download, interface responsiveness, and the app’s performance in slow or unstable internet conditions.

Additional Features

  • Traffic Logging: NetGuard can show traffic data for each app, which is useful for analyzing network usage.
  • Notifications: The app can notify you of internet access attempts, which is helpful for tracking app activity.

NetGuard is a simple way to manage network settings on Android, allowing testers to simulate different connection conditions without using complex tools or command lines. This method is suitable for quick testing as well as more detailed analysis of app behavior under limited internet speeds.

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.

Briwserstack interface - Throttling options
Throttling options on Browserstack

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):

gsm — GSM/CSD (up: 14.4, down: 14.4)
hscsd — HSCSD (up: 14.4, down: 57.6)
grps — GRPS (up: 28.8, down: 57.6)
edge — EDGE/EGPRS (up: 473.6, down: 473.6)
umts — UMTS/3G (up: 384.0, down: 384.0)
hsdpa — HSDPA(up: 5760.0, down: 13,980.0)
lte — LTE (up: 58,000, down: 173,000)
evdo — EVDO (up: 75,000, down: 280,000)
full — No limit, the default (up: 0.0, down: 0.0)

How to test an app on Android emulator with throttled connection?

1. Download Android Studio

2. Create an emulator using Android Virtual Device Manager

3. When creating / editing the emulator pick the cellular type:

  • Tap Show advanced settings
Android Studio interface
Advanced Settings in Android Studio
  • Select speed in the Network section
Android Studio interface
Picking the 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?

  1. Go to Settings
  2. Then Network & Internet
  3. Open Internet
  4. Go to SIM settings
  5. Tap Preferred network type
Instruction on how to switch cellular types on Android
How to switch cellular types on Android

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?

  1. Go to Settings
  2. Then to Mobile Data
  3. Open Mobile Data Options
  4. Tap Voice & Data
Instruction on how to switch cellular types on iOS
How to switch cellular types on iOS

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?

  1. 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.
  2. When in Charles go to Proxy > Throttle settings
  3. Tap Enable Throttling
  4. Select the speed limitation preset or set it up manually
  5. Save the settings
  6. Click Proxy > Start throttling
Charles interface
How to start throttling on Charles

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?

  1. 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)
  2. Enter login and password. You can find them on the router itself (usually both are “admin” by default)
  3. Open the Bandwidth control section
Router admin panel
What a standard Admin panel looks like

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 🙂

  • Technologies