我需要测试应用程序与缓慢的互联网连接的工作。如何在Android模拟器上模拟缓慢的互联网连接?
发布于 2013-09-04 23:32:01
在模拟器仍在运行的情况下进行调整的最简单方法是使用终端连接到模拟器。只需使用telnet或netcat (交互方式,您可以只输入"telnet localhost 5554“并键入"help”--下面的示例展示了如何编写脚本:
$ echo "network speed 100 100" | nc localhost 5554
$ echo "network status" | nc localhost 5554
Current network status:
download speed: 100000 bits/s (12.2 KB/s)
upload speed: 100000 bits/s (12.2 KB/s)
minimum latency: 0 ms
maximum latency: 0 ms
您还可以设置延迟/延迟:
$ echo "network delay gprs" | nc localhost 5554
$ echo "network status" | nc localhost 5554
Current network status:
download speed: 100000 bits/s (12.2 KB/s)
upload speed: 100000 bits/s (12.2 KB/s)
minimum latency: 150 ms
maximum latency: 550 ms
只是让在运行时做事情和测试各种场景变得更容易(通过自动化,手动测试等)。
发布于 2021-04-27 20:54:18
Appium set network speed与
adb emu network speed
示例:
adb emu network speed gsm
所有值(参见appium doc ):gsm、hscsd、gprs、umts、edge、hsdpa、lte、evdo、full
发布于 2021-12-28 07:43:44
确保使用移动网络(而不是WiFi)在模拟器上体验互联网速度更改。
https://stackoverflow.com/questions/6236340
复制相似问题