iPhone间歇性网络测试 [英] iPhone Intermittent Network Testing

查看:137
本文介绍了iPhone间歇性网络测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过使用有限的网络访问权限测试iPhone应用程序(链接)问题虽然这是一个很好的提示,但在通过EDGE使用时测试一段代码的实际性能方面并不是很有帮助。根据我的经验,网络将随机进入连接状态。我想用某种方法来模拟这个。我正在考虑像 sqlite 如何自动测试malloc。

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.


这些检测的mallocs可以设置为
只能失败一次,然后再次启动
,或者继续失败
之后第一次失败。 OOM测试是循环完成的
。在循环的第一次迭代
中,检测到的malloc
在第一个
分配时被操作失败。然后执行一些SQLite操作
并对
进行检查。确保SQLite正确处理OOM错误
。然后,仪表化malloc上的失败时间
计数器是
增加1,测试重复
。循环继续,直到
整个操作运行到完成
而没有遇到模拟的
OOM失败。像这样的测试运行
两次,一次使用检测的
malloc设置为仅失败一次,并且
再次使用检测的malloc设置
在第一次$ b $之后连续失败b失败

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"

我做了一些谷歌搜索,但我想知道是否有一个很好的工具来做到这一点。我会喜欢用我的开发机器模拟服务器和iPhone通过WiFi连接。

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.

推荐答案

Craig Hockenberry发布了脚本,可让您使用以下方法测试不同级别的网络性能模拟器。它还提到了一些在设备上进行测试的技巧。

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.

这篇关于iPhone间歇性网络测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆