最終更新:2019-04-04 (木) 20:06:18 (1848d)  

monkey
Top / monkey

a program that runs on your emulator or device and generates pseudo-random streams of user events such as clicks, touches, or gestures, as well as a number of system-level events.

http://tools.oesf.biz/android-4.0.4_r1.0/xref/development/cmds/monkey/

https://developer.android.com/studio/test/monkey.html

usage

  • usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]
                  [-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]
                  [--ignore-crashes] [--ignore-timeouts]
                  [--ignore-security-exceptions]
                  [--monitor-native-crashes] [--ignore-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] [--pct-pinchzoom PERCENT]
                  [--pct-permission PERCENT]
                  [--pkg-blacklist-file PACKAGE_BLACKLIST_FILE]
                  [--pkg-whitelist-file PACKAGE_WHITELIST_FILE]
                  [--wait-dbg] [--dbg-no-events]
                  [--setup scriptfile] [-f scriptfile [-f scriptfile] ...]
                  [--port port]
                  [-s SEED] [-v [-v] ...]
                  [--throttle MILLISEC] [--randomize-throttle]
                  [--profile-wait MILLISEC]
                  [--device-sleep-time MILLISEC]
                  [--randomize-script]
                  [--script-log]
                  [--bugreport]
                  [--periodic-bugreport]
                  [--permission-target-system]
                  COUNT
    

コマンドラインからのアプリの起動

  • monkey -p <パッケージ名> 1
  • monkey -p <パッケージ名> <回数>
  • adb shell monkey -p アプリケーションID -c android.intent.category.LAUNCHER 1

関連

関連