Preface
This chapter is the developer Guide (Dev Guide)/Developing/Tools/monkeyrunner, version Android2.3 r1, translated and reproduced from the translated words: "biAji", original address: "http://article.yeeyan.org/view/37503/164523 ", thanks again for "bjAji "! We look forward to your participation in translation of Android related information, contact me over140@gmail.com.
Original
Http://developer.android.com/guide/developing/tools/monkeyrunner_concepts.html
Body
MonkeyrunnerThe tool providesAPI, Use thisAPIThe program can be written inAndroidOut-of-code controlAndroidDevices and simulators. PassMonkeyrunnerYou can writePythonProgram to installAndroidAn application or test package, run it, send it a simulated press Key, intercept its user interface image, and store it on the workstation.MonkeyrunnerThe tool is designed to test its functionality./Applications and devices on the framework level, or unit test suites, can be used for other purposes.
MonkeyrunnerTools and(UI/Application Exerciser Monkey)UseUser Interface/Application testing tools, Also knownMonkeyThe tool is not associated.monkey
Tools run directly on devices or Simulatorsadb
Shell. WhileMonkeyrunnerThe tool passes throughAPIDefine specific commands and event control devices or simulators.
MonkeyrunnerThe tool isAndroidThe test provides the following features:
*Multi-Device Control:Monkeyrunner APITest suites can be implemented across multiple devices or simulators. You can connect to all devices at the same time or start all simulators (or all together), connect to each device in sequence based on programs, and then run one or more tests. You can also use a program to start a configured simulator, run one or more tests, and then close the simulator.
*Function test:MonkeyrunnerYou can perform a function test automatically for an application. You can provide the input values of buttons or touch events, and then observe the screenshots of the output results.
*Regression testing:MonkeyrunnerYou can run an application, and compare the result screenshots with the well-known results to test the stability of the application.
*Scalable automation: DueMonkeyrunnerIsAPIToolkit, you canPythonA complete set of systems for module and program development to controlAndroidDevice. BesidesMonkeyrunner APIYou can also use the standardPythonhtml&sa=D&sntz=1&usg=AFQjCNGxDpxs-fdWHno6JjmEGvB3S9XZfQ">os
Andsubprocess
For exampleAndroid Debug BridgeSuchAndroidTools.