GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nlitsme/PythonMonkey: Drop-in replacement for the android Jython monkeyrunner library

BranchesTags
Open more actions menu

Latest commit

 

History

35 Commits
35 Commits

Folders and files

NameName
Last commit message
Last commit date
com/android
com/android
 
 
examples
examples
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
adblib.py
adblib.py
 
 
capture.py
capture.py
 
 
monkeylib.py
monkeylib.py
 
 
monkeyrunner.py
monkeyrunner.py
 
 

Repository files navigation

PythonMonkey

A python library for writing automatic UI testing tools.

This module is a replacement for the Jython monkeyrunner library that comes with the Android SDK.

monkeyrunner compatibility layer

The monkeyrunner module is (almost) a drop-in replacement for the com.android.monkeyrunner Jython module. There is an issue with python 2 vs 3 language compatibility. The Jython interpreter shipped with the android SDK is quite old, it supports python 2.5.3. This python version does not have any of tbe future compatibility features which came with v2.6 and v2.7. This makes writing code which works both on python 3.x and in the Jython environnent a bit more difficult. Mostly this means, you can not use the print function, and you will have to use sys.exc_info() to access the most recent exception.

To be able to use this module, create a subdirectory com/android, and put a symbolic link to the monkeyrunner.py file there.

Then run your monkey script using:

python3 mymonkey.py

Android sdk tools

monkeyrunner

monkeyrunner is an Android SDK tool which runs Jython scripts in a context which provides access to various device resources.

  • monkeyrunner documentation
    • MonkeyDevice for installing, launching and interacting with apps.
    • MonkeyImage for screenshots.
    • MonkeyRunner

Google sourcecode:

  • monkeyrunner
  • chimpchat

monkeyrunner uses two tools on the device to accomplish it's tasks: adb and monkey.

To execute a Jython monkeyrunner script, type:

$ANDROID_HOME/tools/bin/monkeyrunner mymonkey.py

monkey

monkey is the tool running on the device providing the UI interaction support for monkeyrunner.

  • monkey documentation

As a standalone tool it can also be used to monkey-test a ui, by sending random taps to it.

Google sourcecode:

  • monkey

adb

adb is the tool for all developer interactions with android devices,

  • SERVICES.TXT has a list of all supported commands.
  • adb sourcecode

Author

Willem Hengeveld [email protected]

About

Drop-in replacement for the android Jython monkeyrunner library

Topics

androidmonkeyrunnerpythonuitesting

Resources

Readme
MIT license
Activity

Stars

15 stars

Watchers

1 watching

Forks

6 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.