monkey基础知识(二)

Monkey测试策略介绍

例一:整机测试,不测试打电话功能,忽略所有错误,次数100万次

前提:准备好blacklist.txt文件,讲文件push到手机data/local/tmp目录中

adb shell monkey --ignore-crashes --ignore-timeouts --pkg-blacklist-file /data/local/tmp/blacklist.txt -v -v 1000000

 例二:测试计算器30万次,随机种子为100,随机延迟0到1秒,忽略所有错误

adb shell monkey -p com.android.calculator2 -s 100 --ignroe-crashes --ignore-timeouts  --throttle 1000 --randomize-throttle -v -v  300000

例三:测试计算器10万次,触摸事件30%,其它事件50%,错误停止,延时200毫秒

adb shell monkey -p com.android.calculator2 --pct-touch 30 -pct-anyevent 50 --throttle 200 -v -v 100000

例四:对计算器进行旋转压力测试,延时2秒,10万次

adb shell monkey -p com.android.calculator2 --pct-rotation 100 --throttle 2000 -v -v 100000

例五:仅对整机的应用开启测试,时间延时5秒,10万次

adb shell monkey --pct-appswitch 100 --throttle 5000 10000

相关文章:

  • 2021-10-06
  • 2021-05-12
  • 2021-07-19
  • 2021-05-23
  • 2021-04-15
  • 2021-12-23
  • 2021-07-14
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2021-08-30
  • 2021-12-10
  • 2021-07-05
  • 2021-12-21
相关资源
相似解决方案