关闭

android 自动化测试 monkey

749人阅读 评论(1) 收藏 举报

关键字:

模拟器, 真机, 压力测试, 随机操作



zhangmatoMac-mini:platform-tools zhangyun$ ./adb shell monkey -help
usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]
              [-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]
              [--ignore-crashes] [--ignore-timeouts]
              [--ignore-security-exceptions] [--monitor-native-crashes]
              [--kill-process-after-error] [--hprof]
              [--pct-touch PERCENT] [--pct-motion PERCENT]
              [--pct-trackball PERCENT] [--pct-syskeys PERCENT]
              [--pct-nav PERCENT] [--pct-majornav PERCENT]
              [--pct-appswitch PERCENT] [--pct-flip PERCENT]
              [--pct-anyevent PERCENT]
              [--wait-dbg] [--dbg-no-events]
              [--setup scriptfile] [-f scriptfile [-f scriptfile] ...]
              [--port port]
              [-s SEED] [-v [-v] ...] [--throttle MILLISEC]
              COUNT


$ adb shell monkey -p your.package.name -v 500

停止条件:

  • If you have constrained the Monkey to run in one or more specific packages, it watches for attempts to navigate to any other packages, and blocks them.
  • If your application crashes or receives any sort of unhandled exception, the Monkey will stop and report the error.(异常崩溃)
  • If your application generates an application not responding error, the Monkey will stop and report the error.(ANR)
  • =====
  • 0
    0

    查看评论
    * 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
      个人资料
      • 访问:577739次
      • 积分:7444
      • 等级:
      • 排名:第3027名
      • 原创:168篇
      • 转载:43篇
      • 译文:0篇
      • 评论:128条
      最新评论