Appium - adb monkey operation (a)

About 1.Monkey
official in automated test Android has a very famous "monkey" called Monkey, this "monkey" Once started, it will allow test Android applications jump like a monkey, running around.

People often this "monkey" to stress stability testing, inspection and evaluation procedures of the program under test.

Officer declared:
Monkey is a program that runs on your emulator or device and generates a pseudo-random streams of user events, such as clicking, touching or gestures, as well as some system-level events.

You can use the Monkey in a random but repeatable way to stress test the application you are developing.

2.Moneky path
Monkey Android system comes with the program, its startup script is located in the Android system / system / Monkey files in the bin directory, which is located on the jar package Android system / system / Monkey.jar framework document directory.

Step 3. Start   

1. The mobile device connected to
an input command 2. After a successful connection
the adb the shell
3. to directory
CD / System / bin
4. Enter command monkey

4.Monkey command

monkey command format is as follows:
$ adb shell monkey [Options] <Event-COUNT>
• [Options] refers to the monkey can be passed parameters are optional (if not specified options, Monkey will be no feedback mode is activated, and the event any packet sent to all installed in the target environment)
• <event-cOUNT> is the number of events sent at random.

Such as: input 100 is to perform 100 pseudo-random events, are mandatory. adb shell monkey 1000

5.monkey log management

1. saved to the PC in adb shell monkey -v -v 100> d: \ monkeylog.log

2. Save to your phone adb shell monkey -v 100> /sdcard/monkeylog.log

3. Standard error stream flow and saved separately adb shell monkey -v 1000 1> d: \ monkey.log 2> d: \ error.log 

 

Guess you like

Origin www.cnblogs.com/Teachertao/p/11258897.html