1. What is Monkey?
Monkey is a tool included in the SDK.
2. What is the purpose of Monkey testing?
: This tool is used for stress testing. The developer then combines the logs printed by the monkey and the logs printed by the system to resolve problems that arise during the test.
3. What are the characteristics of Monkey testing?
Monkey test, all events are generated randomly without any human subjectivity.
4. Detailed explanation of Monkey command
1). Standard monkey command
[adb shell] monkey [options]
adb shell monkey -v 500 --------Generate 500 random events, affecting all activities in the system (in fact, not all activities, but activities containing Intent.CATEGORY_LAUNCHER or Intent.CATEGORY_MONKEY).
The above is just a simple example. In actual situations, there are usually many options
2). Four categories - common options, event options, constraint options, and debugging options
1: Common options
1 2 |
|
2: Event options
1 2 3 4 |
|
3: Constraint options
1 2 |
|
4: Debug options
1 2 3 4 5 6 7 8 |
|
5. A simple monkey command:
1 |
|
However, in order to ensure the complete number of tests at work, we generally do not exit the stress test immediately when an error occurs. The monkey test command is as follows
1 |
|
6. The package used by monkey: com.ckt.android.junit
The seed value for generating time series: 500
Ignore program crashes, ignore timeouts, and monitor local program crashes , the detail level is 2, and 10,000 events are generated.
For more detailed explanations of the android stress test command monkey, please pay attention to the PHP Chinese website!