使用热点模拟弱网络环境

在测试手机app的时候,我们经常需要测试一下app在弱网络条件下是否有问题,下面一个方法是通过使用macbook 分享热点,然后通过软件限速来模拟弱网络。

 

1. macbook通过网线上网,然后wifi分享做热点。

System Preferences -> sharing,选择“internet sharing”,“share your connection from”选择“ethernet”,“to computers using”选择“wi-fi”。

 

2. 如需使用密码,可在wi-fi options裡面添加。

 

3. 最后勾选“internet sharing”前面的框,再点“start”。

 

4. 在System Preferences -> network中见到“wi-fi”的“network name”是“internet sharing: on”即可。这时你的手机就可以通过wif搜索到这个热点。

 

5. 安装并使用network link conditioner限制网速。

首先在 https://developer.apple.com/downloads/index.action 登入apple dev account搜索HardwareIOTools,下载并安装network link conditioner。

 

6. 安装后打开System Preferences -> network link conditioner,默认已经有多种限速方案。

 

7. 可以在custom profiles中添加新的自定义方案。

 

8. 填入你想要的上下行速度/掉包率/延迟时间即可。

 

实际使用中,连接热点后在手机中通过测速软件测试速度,发现很多时候都与所限制的速度不一样,而且有时没有使用network link conditioner,速度也会变得很慢(幸好本身就是想把网络搞慢,所以凑合着还能用)。如果有朋友也遇到这样的问题,并且知道怎样解决,希望可留言告知,十分感谢。

posted on 2014-09-28 15:29  pasco  阅读(1900)  评论(0编辑  收藏  举报

导航