3

I started writing test to my android app, but I'm stuck. What I need is to test some functionality for Internet issues, such as no Internet connection, loosing Internet connection while doing some stuff and so on.

Is there any good way to test such cases? I think I can't control Internet connection from Android testing framework or inside Android Device Emulator.

What I need is some tools which would control Internet connection for my app. If I have some Internet connection I'd like to be able to set no internet connection, no wifi and so on at any time from my test.

Ari
  • 3,101
  • 2
  • 27
  • 49
  • That's easy, but doesn't involve any programming skills. Put your WiFi router beside you, turn off any other means of internet connection on your Android device. If possible - "forget" passwords for any other visible hotspot. Then, in the middle of heavy data transfer, turn off your router. Or put an empty Pringles box over router's antenna. This may sound stupid, but it works. – David Jashi Jul 03 '13 at 13:14
  • 1
    @DavidJashi I need automated tests that I can run every master commit or every night. – Ari Jul 03 '13 at 13:24
  • 2
    OK, then check this out: http://stackoverflow.com/questions/3930990/android-how-to-enable-disable-wifi-or-internet-connection-programmatically – David Jashi Jul 03 '13 at 13:26

0 Answers0