Many apps and websites now consume lots of data, especially in sectors such as video streaming and audio streaming. Also most apps performing a useful function of some kind are interacting with the server backend to download data and also send updates back to the server.

When testing apps and websites, it’s very useful to have a cross-platform solution to simulate low bandwidth situations – using bandwidth throttling – and this is one of the features of Charles Proxy.

Below, I’ve outlined some fairly simple steps to enable bandwidth throttling testing using Charles Proxy – in this case, running Charles Proxy on a Mac OS X iMac and testing an iOS app.

1) Install and Run Charles Proxy application

Charles Proxy is currently at version 4 and you can install it from https://www.charlesproxy.com

You can either use the free trial – time-limited to 30 mins – or license it, to get full usage.

Launch Charles Proxy application

If running on Mac OSX, a popup should appear asking – Automatic Mac OSX Proxy Configuration – click Grant Privileges

Find your machine’s local IP address within Charles Proxy, use Help -> Local IP Address 

For example. 192.168.0.20

Alternatively, you can find your machine’s local IP address via System Preferences -> Network -> Wifi.

2) On device, need to set it up so the wifi is using the Proxy of the machine you’re running Charles on

iOS devices – On the device you want to test on, go to Wifi settings – select the Wifi you’re using – scroll down to Http Proxy – set it to Manual – set Server to your machine’s Local IP Address and set Port to 8888. 

Android devices – On the device you want to test on, go to Wifi settings – long press on the Wifi you’re using – then in the popup, select Manage Network Settings – in the next popup, change the Proxy to Manual, then enter the Proxy hostname as your machine’s Local IP Address and set Proxy Port to 8888.

Once you’ve made these changes, the Charles Proxy application might popup a window and ask if its allowed – Allow it 

When browsing and/or using an app – the Charles Proxy application should now show you all the traffic being accessed by your device

3) Use Charles Proxy application to throttle bandwidth 

In Charles Proxy application:

Proxy -> Throttle Settings -> Enable Throttling 

Change the Throttle preset and press Ok 

To stop and start throttling:

Proxy -> Stop Throttling 

Proxy -> Start Throttling 

Throttle Presets can be used to test with different settings and it may also be worth testing with different Stability and Reliability %ages to test for unstable/unreliable connections.

4) When finished testing, remember to turn off the throttling – both in Charles Proxy and in the device’s Wifi settings

Other bandwidth throttling solutions and the advantages of Charles over them 

Other throttling solutions are usually specific to a certain platform – e.g. iOS-only, Android-only 

Charles can be used over any platform, with a bit of setups on the device to be tested on – so can be used over iOS, Android, and Web App also 

Some other throttling solutions 

Chrome browser has throttling settings in Developer Tools – but obviously that’s then limited to that browser 

iOS – XCode – Using Network Link Conditioner (on both iOS Simulator & iOS devices)   – see https://www.natashatherobot.com/simulate-bad-network-ios-simulator/ and http://www.thomashanning.com/network-link-conditioner/ 

Android – there maybe something similar in Android Studio

 

I’ve now also added the following extra – and more advanced – Charles Proxy posts:

 

About my testing services: iOS App Testing / Android App Testing / Website Testing