Android Automated Stress test-monkey 3 command parameters

Source: Internet
Author: User

Use the Monkey Help command to view the command parameters as follows:

C:\users\chenfenping>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] [--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

1 parameter:-P

For constraint restrictions, use this parameter to specify one or more packages (the package, which is app). After you specify the package, Monkey will only allow the system to start the specified app, and if you do not specify a package, it will allow the system to boot all apps in the device.

* Specify a package: adb shell monkey-p CN.EMONEY.ACG 10* Specify multiple packages: adb shell monkey-p cn.emoney.acg–p cn.emoney.wea-p CN.EMONEY.ACG 1 00* do not specify package: adb shell Monkey 100

2 parameter:-V

Used to specify the level of feedback information (the level of information is the verbosity of the log), with a total of 3 levels, respectively, with the corresponding parameters as shown in the following table:

-P cn.emoney.acg–v1-P cn.emoney.acg–v-v2-P cn.emoney.acg–v-v–v description The most detailed log, including the selected /unchecked activity information in the test

3 parameter:-S

Used to specify the seed value of the pseudo-random number generator, and if the seed is the same, the sequence of events produced by the two monkey tests is the same.

-P cn.emoney.acg–s-p cn.emoney.acg–s 10 100

The effect of the two Tests is the same, because the simulated sequence of user actions (a sequence of operations consisting of each operation in a certain order) is the same.


4 Parameters:--throttle < milliseconds >

Used to specify the delay between user actions (that is, events), in milliseconds;

adb shell monkey-p cn.emoney.acg–throttle 5000 100

5 parameter:--ignore-crashes

Lets you specify whether monkey stops running when the application crashes (force& close error). If you use this parameter, even if the application crashes, monkey will still send the event until the event count is complete.

ADB shellmonkey-p CN.EMONEY.ACG--ignore-crashes test Process even if the ACG program crashes, Monkey continues to send events until the number of events reaches 1000
-P CN.EMONEY.ACG test process, if the ACG program crashes, Monkey will stop running

6 parameter:--ignore-timeouts

Used to specify whether monkey stops running when an application has a ANR (application No responding) error. If you use this parameter, monkey will still send events until the event count is complete, even if the application has a ANR error.

ADB shellmonkey-p CN.EMONEY.ACG--ignore-timeouts 1000

7 parameter:--ignore-security-exceptions

Used to specify whether monkey stops running when an application has a licensing error (such as certificate licensing, network licensing, and so on). If you use this parameter, monkey will still send events until the event count is complete, even if the application has a licensing error.

ADB shellmonkey-p CN.EMONEY.ACG--ignore-security-exception 1000


8 parameter:--kill-process-after-error


Lets you specify whether to stop the application from running when an error occurs. If this parameter is specified, the application stops running and remains in the current state when an application error occurs

(Note: The application is static only when the error occurs, and the system does not end the process of the application).

ADB shellmonkey-p CN.EMONEY.ACG--kill-process-after-error 1000


9 parameter:--monitor-native-crashes

Used to specify whether to monitor and report local code for application crashes.

ADB shellmonkey-p CN.EMONEY.ACG--monitor-native-crashes 1000

10 Parameter:--pct-{+ event category}{+ event category%}

Used to specify the percentage of events per category (in the Monkey event sequence, the number of such events as a percentage of the total number of events)
Example:
--pct-touch {+ percent}
Adjust the percentage of touch events (Touch event is a down-up event that occurs in a single location on the screen)

adb shell monkey-p CN.EMONEY.ACG--pct-touch 10 1000


--pct-motion {+ percent}
Adjust the percentage of action events (an action event consists of a down event, a series of pseudo-random events, and an up event somewhere on the screen)

adb shell monkey-p CN.EMONEY.ACG--pct-motion 20 1000


--pct-trackball {+ percent}
Adjusts the percentage of track events (track events consist of one or several random movements, sometimes accompanied by clicks)

adb shell monkey-p CN.EMONEY.ACG--pct-trackball 30 1000


--pct-nav {+ percent}

Adjust the percentage of basic navigation events (navigation events consist of up/down/left/right from the direction input device)

adb shell monkey-p CN.EMONEY.ACG--pct-nav 40 1000


--pct-majornav {+ percent}
Adjust the percentage of primary navigation events (these navigation events usually trigger actions in the graphical interface, such as: 5-way keyboard, Fallback button, menu button)

adb shell monkey-p CN.EMONEY.ACG--pct-majornav 50 1000


--pct-syskeys {+ percent}
Adjust the percentage of the System key event (these keys are usually reserved for use by the system, such as home, back, Start call, End call, and volume control keys)

adb shell monkey-p CN.EMONEY.ACG--pct-syskeys 60 1000

--pct-appswitch {+ percent}
Adjusts the percentage of startup activity. In a random interval, monkey will execute a startactivity () call as a way to maximally cover all activity in the package

ADB shell Monkey-p cn.emoney.acg--pct-appswitch 70 1000


--pct-anyevent {+ percent}
Adjusts the percentage of other types of events. It includes all other types of events, such as keystrokes, other infrequently used device buttons, and so on.

ADB Shell Monkey-p CN.EMONEY.ACG


--pct-anyevent 100 1000* Specify the percentage of multiple types of events:

adb shell monkey-p CN.EMONEY.ACG--pct-anyevent--pct-appswitch 50 1000



Android automated Stress test-monkey 3 command parameters

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.