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.
  • 相关阅读:
    最长回文子串
    学习与提升
    jupyter notebook nginx 试听录音文件,网页试听
    【神经网络】batch、epoch、iteration的含义
    【tensorflow】Tensorflow入门教程
    最全BAT面试题
    打印二叉树
    基于argparser模块实现 ls 功能(基本实现)
    比较详细的argpasrse模块的基本使用
    ini文件转换为Json文件
  • 原文地址:https://www.cnblogs.com/linxiaojiang/p/3183936.html
Copyright © 2011-2022 走看看