Mobile platform automation testing from scratch-monkeyrunner tool use (first section)

Source: Internet
Author: User

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)

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.