Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to simulate network issues on a Android device?

Tags:

android

I need to test my app in following scenario:

  • connect device to wifi (with the internet).
  • simulate internet interruption (lack of the internet but the device must stay connected to the wifi network).
  • after few seconds the internet need to be active again.

I could simulate this pulling the adsl cable out of my ruter, but then it won't reconnect fast enough. Is this any way to simulate this programmatically?

like image 421
XorOrNor Avatar asked Dec 20 '13 11:12

XorOrNor


People also ask

How do I simulate network error?

Simulating a hard-down or node failure is fairly easy. All you have to do is turn off the node itself to verify how the system responds (system reconvergence). If high availability is enabled, a secondary/standby node will immediately take over and become the active node, servicing user requests.


1 Answers

If you have a Mac, you can do it with Network Link Conditionner. It's really efficient, see here the step to install it :

http://nshipster.com/network-link-conditioner/

like image 61
Andros Avatar answered Oct 19 '22 14:10

Andros