views:

292

answers:

2

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.

A: 

I had this issue when developing GigGuide.me for iphone.

Wrapping my ipod touch in tinfoil didnt seem to reduce wifi at all, so I had to walk down the street to the edge of my wireless router reach to reproduce the problem!

A fault injection tool would really help here.

gord
You could try a custom image for your router and turn down the signal strength as well.
Will Bickford
+2  A: 

Craig Hockenberry posted a script here that will let you test varying levels of network performance using the simulator. It also mentions some tricks for testing on the device itself.

Elfred