Monkey test adb shell Monkey

Source: Internet
Author: User



ADB Shell Monkey



-P Com.android.recorder



--throttle



--ignore-crashes



--monitor-native-crashes



--ignore-security-exceptions



--ignore-timeouts



--ignore-native-crashes



--pct-syskeys 10



--pct-nav 20



--pct-majornav 20



--pct-touch 40



--pct-appswitch 10



-v-v-V 20000






*#* #3646633 #*#* Mtklogger





[email protected]:~/mp_mtk$ adb shell monkey--help** error:unknown option:--helpusage: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]              [--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]  count[email protected]:~/mp_mtk$




adb shell Monkey     -P com.letv.android.recorder     --throttle     --ignore-crashes     -- Monitor-native-crashes     --ignore-security-exceptions     --ignore-timeouts     --ignore-native-crashes     --pct-syskeys     --pct-nav     --pct-majornav     --pct-touch     --pct-appswitch-     V 20000ADB Shell monkey-p com.letv.android.recorder--throttle--ignore-crashes--monitor-native-crashes-- Ignore-security-exceptions--ignore-timeouts--ignore-native-crashes--pct-syskeys--pct-nav 20-- Pct-touch--pct-appswitch 10-v-v-v 20000
Category Option Description
General --help Prints a simple usage guide.
-v

Each-v on the command line would increment the verbosity level. Level 0 (the default) provides little information beyond startup notification, test completion, and final results. Level 1 provides more details on the test as it runs, such as individual events being sent to your activities. Level 2 provides + detailed setup information such as activities selected or not selected for testing.

Each-V of the command line increases the level of feedback information. Level 0 (default) provides less information than startup prompts, test completion, and end results. Level 1 provides more detailed testing information, such as events sent individually to the activity. Level 2 provides more detailed setup information, such as the activity that was selected or unchecked in the test.


Events -s <seed>

Seed value for pseudo-random number generator. If you re-run the Monkey with the same seed value, it'll generate the same sequence of events.

Generate random events of the seed, the same value produces the same sequence of events

--throttle <milliseconds>

Inserts a fixed delay between events. You can use this option to slow down the Monkey. If not specified, there was no delay and the events are generated as rapidly as possible.

Sets the event interval between events of two times. This parameter reduces the speed, and if you do not specify this parameter, the system sends the event as soon as possible.

--pct-touch <percent>

Adjust percentage of touch events. (Touch events is a down-up event in a and the screen.)

Adjust the percentage of touch events to set

--pct-motion <percent>

Adjust Percentage of motion events. (Motion events consist of a down event somewhere on the screens, a series of pseudo-random movements, and an up event.)

Adjust the percentage of Set slide events

--pct-trackball <percent>

Adjust percentage of trackball events. (Trackball events consist of one or more random movements, sometimes followed by a click.)

Adjust the percentage of the Trackball event set

--pct-nav <percent>

Adjust percentage of "basic" navigation events. (Navigation events consist of up/down/left/right, as input from a directional input device.)

Adjust set navigation event up/down/left/right) percentage

--pct-majornav <percent>

Adjust percentage of "major" navigation events. (These is navigation events that would typically cause actions within your UI, such as the center button in a 5-way pad, t He back key, or the menu key.)

Adjust settings (main navigation event back key, menu key) percent

--pct-syskeys <percent>

Adjust percentage of "system" key events. (These is keys that is generally reserved for use by the system, such as Home, back, Start call, End call, or Volume con Trols.)

Adjust set System Key events percentage of Home, back, Startcall, Endcall, Volumecontrol)

--pct-appswitch <percent>

Adjust percentage of activity launches. At random intervals, the Monkey would issue a startactivity () call, as a-to-be-maximizing coverage of all activities Withi N your package.

Adjust the percentage of settings (switching between activity)

--pct-anyevent <percent>

Adjust percentage of other types of events. This was a catch-all for all other types of events such as keypresses, other less-used buttons on the device, and so forth.

Adjust settings (any event) percentage

constraints -P <allowed-package-name>

If you specify one Or more packages this, the Monkey would only allow the system to visit activities within those packages. If your application requires access to activities on other packages (e.g. to select a contact) you'll need to specify Thos e packages as well. If you don ' t specify any packages, the Monkey would allow the system to launch activities in all packages. To specify multiple packages, use the-p option multiple times-one-p option per package.

Specifies a valid package (if not specified, it is valid for all the package in the system), and one-p corresponds to a valid package, such as:-P com.ckt-p Com.ckt.asura; You can specify more than one

-c <main-category>

If you specify one or more categories this, the Monkey WI ll only allow the system to visit activities that is listed with one of the specified categories. If you don ' t specify any categories, the Monkey would select activities listed with the category Intent.category_launcher O R Intent.category_monkey. To specify multiple categories, use the-c option multiple times-one-c option per category.

Activity must contain at least one specified category before it can be started, otherwise it will not start;

debugging --dbg-no-events

When specified, the Monkey would perfo RM the initial launch into a test activity, but would not be generate any further events. For best results, combine with-v, one or more package constraints, and a non-zero throttle to keep the Monkey running for Seconds or more. This provides a environment in which the can monitor package transitions invoked by your application.

Set this option, monkey will perform an initial boot, enter into a test activity, and no further events will be generated. For best results, combine it with-V, one or several package constraints, and a non-0 value that keeps monkey running for 30 seconds or longer, providing an environment to monitor conversions between packages called by the application.

 

--hprof

If set, this option would generate profiling reports immediately before and after the Monkey event sequence. This would generate large (~5MB) files in Data/misc. See Traceview For more information on trace files.

Set this option to generate the profiling report immediately before and after the monkey event sequence. This will generate a large file (~5MB) in the Data/misc, so use it with care.

--ignore-crashes

Normally, the Monkey would stop when the application crashes or experiences any type of unhandled exception. If you specify this option, the Monkey would continue to send events to the system, until the count is completed.

Typically, monkey stops running when an application crashes or any runaway exception occurs. If this option is set, Monkey will continue to send events to the system until the count is complete.

--ignore-timeouts

Normally, the Monkey would stop when the application experiences any type of timeout error such as a ' application not RESPO Nding "dialog. If you specify this option, the Monkey would continue to send events to the system, until the count is completed.

Typically, monkey stops running when an application has any time-out errors, such as the application not responding dialog box. If this option is set, Monkey will continue to send events to the system until the count is complete.

--ignore-security-exceptions

Normally, the Monkey would stop when the application experiences any type of permissions error, for example if it attempts To launch a activity that requires certain permissions. If you specify this option, the Monkey would continue to send events to the system, until the count is completed.

Typically, when an application has a licensing error (such as starting an activity that requires some permission), Monkey will stop running. If this option is set, Monkey will continue to send events to the system until the count is complete.

--kill-process-after-error

Normally, when the Monkey stops due to a error, the application that failed would be a left running. When this option is set, it would signal the system to stop the process in which the error occurred. Note, under a normal (successful) completion, the launched process (es) is not stopped, and the device was simply left in T The He last state after the final event.

Typically, when Monkey is stopped due to an error, the application that is faulted will continue to be in the running state. When this option is set, the system will be notified of the process of stopping the error. Note that the normal (successful) end, and does not stop the process from starting, the device simply stays in the final state after the end event.

--monitor-native-crashes

Watches for and reports crashes occurring in the Android system native code. If--kill-process-after-error is set, the system would stop.

Monitor and report crash events for native code in your Android system. If--kill-process-after-error is set, the system will stop running.

--wait-dbg

Stops the Monkey from executing until a debugger are attached to it.

Stop monkey in execution until there is a debugger connected to it





Monkey test adb shell Monkey


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.