Selected from: http://yuedu.baidu.com/ebook/d4d8b6121eb91a37f0115c1d
Monkeyrunner is an automated test tool developed by Google for use with Android systems, and is brought in by Android, in the Android SDK (Sdk:software development Kit Software Development Kit), Monkeyrunner provides a set of APIs (Api:application programming Interface application Interface), Programs written in this API can control Android devices and emulators outside of Android code. With Monkeyrunner, you can write a Python program to install an Android app, or you can run it to send some analog keystrokes, screen strokes, input characters, screenshots, and save pictures. The main purpose of the Monkeyrunner tool is to apply characters, screenshots and save pictures. The main design of the Monkeyrunner tool is for application testing functions. Perhaps a lot of reader friends, may be very curious to have a front-end performance test tool called Monkey, but also a monkeyrunner called automated testing tools, is not very similar? Do they have any connection? The Monkey tool is primarily run directly in the ADB shell of the device or simulator, generating a pseudo-random event stream for the user or the system, Monkey has no way to control the logic relationship, such as: when we find that the phone's resolution is 1920x1080, execute a script named "S1.ms", Other resolutions, the name is "s2.ms" of the script. Instead, the Monkeyrunner tool uses a client/server architecture that runs on the PC side, explaining Jython script code step by line and sending its commands to an Android device or simulator. Monkeyrunner is based on Jython, and Jython provides an interoperable bridge between Python and the Java language, extending the monkeyrunner to make it more powerful. You can record the resulting script by writing the Monkeyrunner script manually or by starting the recording function with the "monkey_recorder.py" script.
This article is from the "Testers Home" blog, please make sure to keep this source http://tester2test.blog.51cto.com/461899/1642005
Mobile platform automation testing starts with the zero--monkeyrunner tool (section I)