{"id":23385,"date":"2025-11-21T00:25:43","date_gmt":"2025-11-21T05:25:43","guid":{"rendered":"https:\/\/qxf2.com\/blog\/?p=23385"},"modified":"2025-11-21T00:25:43","modified_gmt":"2025-11-21T05:25:43","slug":"simulating-slow-network-speeds-for-mobile-app-testing-using-your-laptop-as-a-hotspot","status":"publish","type":"post","link":"https:\/\/qxf2.com\/blog\/simulating-slow-network-speeds-for-mobile-app-testing-using-your-laptop-as-a-hotspot\/","title":{"rendered":"Simulating slow network speeds for mobile app testing using your laptop as a hotspot"},"content":{"rendered":"<p>When testing mobile apps, functional validation is only half the story. A lot of critical issues surface during non-functional testing, especially in areas like interruption testing. One of the key subcategories under interruption testing is network interruption testing. Some features that work flawlessly on a strong Wi-Fi connection can slow down, fail silently, or time out when the network becomes weak or unstable.<\/p>\n<p>During one of our previous engagements, a colleague noticed some inexplicable failures in an app we were testing. After some digging, we discovered the real culprit: the device was on an unusually slow network. That, in turn, led us to explore reliable ways to simulate poor network conditions during testing.<\/p>\n<hr>\n<h3>Why this post<\/h3>\n<p>We wanted a practical way to test the app&#8217;s behaviour on a slow or unstable network without relying on premium tools or expensive network simulators. We tried a few apps that claimed to simulate slow networks, but the results were mixed. Some didn&#8217;t work as expected, while others required paid versions to unlock throttling features.<\/p>\n<hr>\n<h3>Setting up a Slow Network Using Ubuntu<\/h3>\n<p>Since I am using an Ubuntu machine, this post focuses on how to simulate slow network conditions on a Linux-based system. On Windows, you may need to use a third-party tool (e.g., NetLimiter or Clumsy) to throttle the network, as we are not aware of a built-in tool like Traffic Control. Let us know in the comments if you know of one.<\/p>\n<h4>Step 1: Before creating a Wi-Fi hotspot<\/h4>\n<p>Most laptops cannot use the same Wi-Fi card to both connect to a Wi-Fi network and broadcast a hotspot at the same time. This means that when you enable a hotspot, your existing Wi-Fi connection will disconnect.<\/p>\n<p>The simplest setup is to use a wired (Ethernet) connection for internet while your Wi-Fi card handles the hotspot.<\/p>\n<p>If you don&#8217;t have Ethernet, you can use one of the following alternatives:<\/p>\n<p>* A USB Wi-Fi adapter (use one adapter for Wi-Fi, and the built-in adapter for the hotspot)<\/p>\n<p>* USB tethering from your phone to provide internet to your laptop, and then create the hotspot from the laptop<\/p>\n<hr>\n<h4>Step 2: Use your system as a Wi-Fi hotspot<\/h4>\n<p>To create a hotspot from your Ubuntu system:<\/p>\n<p>1. Go to Settings\/Wi-Fi<br \/>\n2. Turn on Wi-Fi Hotspot<br \/>\n3. Set your Network Name and Password<br \/>\n4. Connect your mobile device to this newly created hotspot<\/p>\n<p>Once connected, your phone&#8217;s internet traffic flows through your Ubuntu system, allowing you to control and throttle the network speed from your laptop.<br \/>\nIf you&#8217;re on Windows, you can follow this guide: <a href=\"https:\/\/www.howtogeek.com\/214080\/how-to-turn-your-windows-pc-into-a-wi-fi-hotspot\/\">How to Turn Your Windows PC Into a Wi-Fi Hotspot<\/a><\/p>\n<hr>\n<h4>Step 3: Throttle network speed using tc (Traffic Control)<\/h4>\n<p>Ubuntu includes a built-in tool called <a href=\"https:\/\/manpages.ubuntu.com\/manpages\/xenial\/\/man8\/tc.8.html\">tc (Traffic Control)<\/a> that lets you simulate slow, unstable, or high-latency networks without installing anything extra. This is the method we used.<\/p>\n<h5>1. Identify your Wi-Fi interface<\/h5>\n<p>First, find the interface that your hotspot is using:<\/p>\n<pre lang=\"bash\">\r\nip link show\r\n<\/pre>\n<p>Look for the active Wi-Fi interface. <em>(For example, on my system it was wlp0s20f3.)<\/em><\/p>\n<h5>2. Apply throttling (simulate slow network)<\/h5>\n<p>Here&#8217;s an example of limiting bandwidth and adding latency:<\/p>\n<pre lang=\"bash\">\r\nsudo tc qdisc add dev wlp0s20f3 root tbf rate 128kbit burst 16kbit latency 600ms\r\n<\/pre>\n<p>This sets:<br \/>\n* Speed: 128 kbps<br \/>\n* Burst buffer: 16 kb<br \/>\n* Latency: 600 ms<\/p>\n<p>You can adjust these values based on the network condition you want to test.<\/p>\n<h5>3. Remove throttling (restore normal speed)<\/h5>\n<p>When you&#8217;re done testing:<\/p>\n<pre lang=\"bash\">\r\nsudo tc qdisc del dev wlp0s20f3 root\r\n<\/pre>\n<p>There you have it. Once you apply the <em>tc<\/em> rules, your Ubuntu system will slow down the network on the hotspot. Any device connected to it, including your phone, will experience the reduced speeds and added latency. This gives you a practical way to observe how your app behaves when the network isn&#8217;t ideal.<\/p>\n<hr>\n<h3> Conclusion<\/h3>\n<p>Real-world networks are messy, and app behaviour changes drastically under stress. Setting up a controlled slow network on Ubuntu turned out to be a quick, practical way to test these scenarios. It doesn&#8217;t replace full-scale network simulators, but it&#8217;s more than enough for everyday testing. Hopefully this walkthrough helps you bring more realistic network checks into your workflow.<\/p>\n<hr>\n<h3> Need help going beyond &#8220;real-world&#8221; testing? Contact Qxf2<\/h3>\n<p>Many teams assume that testing in real-world conditions is just about using the app the way a user would. But as QA engineers, we need to go a step further, we must recreate those conditions intentionally, control them, and make the tests repeatable. That&#8217;s where thoughtful techniques like network throttling really add value.<\/p>\n<p>At Qxf2, we specialize in designing practical, repeatable tests for messy real-world scenarios like slow networks, interruptions, unpredictable environments, and more. If you need help bringing this level of depth into your testing workflow, <a href=\"https:\/\/qxf2.com\/contact?utm_source=simulatingSlowNetwork&#038;utm_medium=click&#038;utm_campaign=From%20blog\">reach out<\/a>. We enjoy the technical challenges others overlook.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>When testing mobile apps, functional validation is only half the story. A lot of critical issues surface during non-functional testing, especially in areas like interruption testing. One of the key subcategories under interruption testing is network interruption testing. Some features that work flawlessly on a strong Wi-Fi connection can slow down, fail silently, or time out when the network becomes [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[],"class_list":["post-23385","post","type-post","status-publish","format-standard","hentry","category-mobile-automation"],"_links":{"self":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/23385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/comments?post=23385"}],"version-history":[{"count":20,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/23385\/revisions"}],"predecessor-version":[{"id":23448,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/23385\/revisions\/23448"}],"wp:attachment":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/media?parent=23385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/categories?post=23385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/tags?post=23385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}