zoukankan      html  css  js  c++  java
  • android debug学习笔记 monkeyrunner

    The monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code. With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation. The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes.

    The monkeyrunner tool is not related to the UI/Application Exerciser Monkey, also known as the monkey tool. The monkey tool runs in an adb shell directly on the device or emulator and generates pseudo-random streams of user and system events. In comparison, the monkeyrunner tool controls devices and emulators from a workstation by sending specific commands and events from an API.

    The monkeyrunner tool provides these unique features for Android testing:

    • Multiple device control: The monkeyrunner API can apply one or more test suites across multiple devices or emulators. You can physically attach all the devices or start up all the emulators (or both) at once, connect to each one in turn programmatically, and then run one or more tests. You can also start up an emulator configuration programmatically, run one or more tests, and then shut down the emulator.
    • Functional testing: monkeyrunner can run an automated start-to-finish test of an Android application. You provide input values with keystrokes or touch events, and view the results as screenshots.
    • Regression testing - monkeyrunner can test application stability by running an application and comparing its output screenshots to a set of screenshots that are known to be correct.
    • Extensible automation - Since monkeyrunner is an API toolkit, you can develop an entire system of Python-based modules and programs for controlling Android devices. Besides using the monkeyrunner API itself, you can use the standard Python os and subprocess modules to call Android tools such as Android Debug Bridge.
  • 相关阅读:
    正则表达式
    webfrom 母版页
    repeater的command事件用法
    JVM进程cpu飙高分析
    @Transactional导致无法动态数据源切换
    mysql分页查询优化(索引延迟关联)
    MAC下安装Homebrew 和 @权限的问题
    RabbitMQ安装以及集群部署
    RabbitMQ 延时消息队列
    java 实现生产者-消费者模式
  • 原文地址:https://www.cnblogs.com/linxiaojiang/p/3183936.html
Copyright © 2011-2022 走看看