title: iPhone Intermittent Network Testing
body: <p>I've seen the "Testing iPhone app with limited network access" (<a href="https://stackoverflow.com/questions/955341/testing-iphone-app-with-limited-network-access">link</a>) 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 <a href="http://www.sqlite.org/testing.html" rel="nofollow noreferrer">sqlite</a> does automated testing of malloc.</p>
  
  <blockquote>
    <p>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"</p>
  </blockquote>
  
  <p>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.</p>