Simulate slow connections with the network throttling tool

Blog

WANem

WANem stands for Wide Area Network Emulator. The tool provides the real world experience of the network connection which can be used by the developers for testing their application during development or testing it over the LAN connection. The WANem was one of the 2008 Community Choice Awards finalists and also has won the FOSS INDIA Awards 2008.

Know more about WANem here

Simulating a slow Internet connection for desktop apps

Using Fiddler

This is a fun one 😁 Since desktop applications are stand-alone, they probably don’t have any specific settings, we need some outside help. Here’s where Fiddler comes in. If you’re not familiar with it, let me give you a quick review. It’s a debugging proxy server tool used that helps with logging, inspecting, and modifying HTTP requests. It works on Windows, Linux, and Mac OS.

Another good thing Fiddler can do is to simulate a slow connection. For that, do the following steps:

Open the Rules menu, and select Customize Rules:

This will open up the FiddlerScript Rules files in

This will open up the FiddlerScript Rules files in an editor. Inside the editor, there is a condition if (m_SimulateModem) which is what we want to do – i.e. simulate a modem.

You can see there are two values: one for delaying

You can see there are two values: one for delaying the request, and one for delaying the response. We can adjust both values as needed. After that, save the file and close it.

Keep in mind that the condition that verifies if we are simulating a modem is still false, so the delays won’t happen yet. To make it true, expand the Rules menu again, and select Performance -> Simulate Modem Speeds:

From now on, all requests and responses will be de

From now on, all requests and responses will be delayed, so you can see how your application behaves when it takes longer to send or receive information. Remember to disable the option and/or close Fiddler once you are done with your tests, so you can use your regular network connection.

Using Clumsy

Clumsy is another nice free app, that lets you simulate various network problems that can help your testing:

You can download it from this link, and then selec

You can download it from this link, and then select what you want it to do. It’s easier to use than Fiddler, but the bad news is that it only works on Windows.

Video

Running

And Then You Turn on the Internet

In the mobile world, there’s another dimension to this problem: “It works on my Wi-Fi!”

Besides all the different devices developers have to consider, it is also essential to bear in mind the need to simulate slow connection conditions for apps that rely on network access.

Good developers write software with the offline fi

Good developers write software with the offline first motto in mind. This means writing apps that behave well when there’s no connectivity and act even better when there is. Testing for offline and online behavior is as easy as turning on or off the phone’s airplane mode. But these two extremes don’t cover the whole gradient required to simulate slow network conditions.

There isn’t just offline or online. There’s lie-fi, GPRS, 2G, EDGE, 3G, 4G, 5G, and Wi-Fi. And there’s switching between all these network conditions while the app runs. Since it’s easy to test offline vs. online, applications are often designed to only function with these two states. The result? Apps that work well both offline and online (in good network conditions) but perform poorly under bad connectivity, sometimes to the point of complete unusability.

It turns out, “it works on my Wi-Fi” doesn’t mean “it works on every mobile network,” as connectivity can vary significantly. A key factor for building robust apps is to simulate poor network conditions to make testing more accessible to developers.

Fiddler – The Free Web Debugging Proxy by Telerik

Fiddler is a free web debugging proxy for any browser. Some of the features of Fiddler includes Monitor HTTP/HTTPs traffic from any browser, Test the performance of your web sites and apps etc.

Know more about Fiddler – The Free Web Debugging Proxy by Telerik and download here

Subscribe

Subscribe to get our best content in your inbox Testing trends & best practices Step-by-step tutorials & tips Authentic opinion blogs

Tags