"Test" Android Monkey

Source: Internet
Author: User

Here is a monkey test method: Single Module Monkey test


The following is an example of the monkey Directive:

[Plain]View Plaincopy
    1. Monkey-s--throttle 450-p com.android.cameraswitch--kill-process-after-error--ignore-timeouts-- IGNORE-SECURITY-EXCEPTIONS-V 10000


This monkey instruction is test: Generates 10,000 pseudo-random operations (including touch, keystrokes, gestures, etc.) in the camera module.
The following is a brief description of the parameters involved:
-S <seed>
The seed value of the pseudo-random number generator. If you run Monkey again with the same seed value, it will generate the same sequence of events.
--throttle <milliseconds>
Inserts a fixed delay between events. This option slows down the execution speed of the Monkey. If this option is not specified, the Monkey will not be delayed and the event will be produced as soon as possible.
- P <allowed-package-name>
If you specify one or several packages with this parameter, monkey will only allow the system to start the activity in those packages. If your application also needs to access activity in other packages (such as choosing to take a contact), those packages need to be specified at the same time. If you do not specify any packages, monkey will allow the system to start the activity in all packages. To specify multiple packages, you need to use multiple-p options, and each-p option can be used for only one package.
--kill-process-after-error
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.
--ignore-timeouts
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
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.
- V
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.

[Plain]View Plaincopy
    1. adb shell monkey-s--throttle 800-p net.kindroid.fm--ignore-timeouts--ignore-security-exceptions-v 100000

[Plain]View Plaincopy
  1. Steps:
  2. 1. Do not ignore exceptions
  3. adb shell monkey -p com.thunderst.radio --throttle 500  -s 600 -v -v -v 800000 >c:\long_radio_report.txt  
  4. directive meaning: The application of the test is FM, the delay between events is 500 milliseconds, the seed seeds value is 600, three v indicates the highest level of output monkeylog, that is, the output of the most detailed monkey Log, the number of events tested 800,000 times, Log is stored in the ong_radio_report.txt of the C drive.
  5. 2, ignoring exception   
  6. adb shell monkey-p com.thunderst.radio--throttle 500-s--ignore-crashes--ignore-timeouts--ignore-security-except Ions--ignore-native-crashes--monitor-native-crashes-v-v-v 800000 >c:\long_radio_report.txt

"Test" Android 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.