Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone Intermittent Network Testing

I've seen the "Testing iPhone app with limited network access" (link) question, and while it's a great tip, it's not very helpful in terms of testing the actual performance of a piece of code when used over EDGE. In my experience the network will randomly come in an out of connectedness. I'd like some way to simulate this. I'm thinking of something like how sqlite does automated testing of malloc.

These instrumented mallocs can be set to fail only once and then start working again, or to continue failing after the first failure. OOM tests are done in a loop. On the first iteration of the loop, the instrumented malloc is rigged to fail on the first allocation. Then some SQLite operation is carried out and checks are done to make sure SQLite handled the OOM error correctly. Then the time-to-failure counter on the instrumented malloc is increased by one and the test is repeated. The loop continues until the entire operation runs to completion without ever encountering a simulated OOM failure. Tests like this are run twice, once with the instrumented malloc set to fail only once, and again with the instrumented malloc set to fail continuously after the first failure"

I've done a bit of Googling but I wondered if there was a good tool for doing this. I'd like to simulate with my dev machine as the server and the iPhone connecting via WiFi.

like image 918
Steven Canfield Avatar asked Jul 14 '26 16:07

Steven Canfield


1 Answers

You could install Apple's Network Link Conditioner

On Yosemite:

Network Link Conditioner can be found in the "Hardware IO Tools for Xcode" package. This can be downloaded from the Apple Developer Downloads page. Once the download has finished, open the DMG and double-click "Network Link Condition.prefPane" to install (source).

Network Link Conditioner

On older versions of OSX:

Mountain Lion / Mavericks: Xcode > Open Developer Tool > More Developer Tools
Lion: /Developer/Applications/Utilities/Network Link Conditioner

like image 97
Tieme Avatar answered Jul 17 '26 17:07

Tieme



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!