Questions tagged [monkeyrunner]

Monkeyrunner is tool from Android SDK which provides an API for writing programs that control an Android device or emulator from outside of Android code.

Monkeyrunner is a host side application to control a monkey instance on a device.
Monkeyrunner provides some useful helper functions to control the device as well as various other methods to help script tests.

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.

476 questions
0
votes
0 answers

How do you stop a Monkeyrunner script?

I was experimenting with a Monkeyrunner script which repeated some touch actions 100 times. After noticing a bug, I wanted to stop the script, but didn't find any tools to do this. I tried to kill the com.android.commands.monkey process via adb, but…
Simon Bohnen
  • 143
  • 1
  • 6
0
votes
1 answer

Can Firebase Test Lab run Monkeyrunner tests?

I'm not really sure if this is the correct stack exchange site to ask on, but I can't find anything via google, SO search or on the firebase or android developer sites. I want to make use of the free spark tier of Firebase Test Lab to run…
Russ Wheeler
  • 2,590
  • 5
  • 30
  • 57
0
votes
2 answers

Actions in monkeyrunner are not reliable

Question My application has a map-like canvas where the user can move by dragging the map around. What I'm trying to accomplish is move the map to the right of 100px and then to the left of 100px and check if the position in the center is the…
Shoe
  • 74,840
  • 36
  • 166
  • 272
0
votes
1 answer

monkeyrunner as REPL?

Question Given that by running monkeyrunner without arguments it starts a REPL session where I can use monkey runner python classes and modules. Is there a way to also load a python class in there and test that class using the REPL? What I…
Shoe
  • 74,840
  • 36
  • 166
  • 272
0
votes
1 answer

Using python unittest with monkeyrunner vs without monkeyrunner

I have this: import unittest import sys, os sys.path.append(os.path.dirname(sys.argv[0])) class TestStringMethods(unittest.TestCase): @classmethod def setUpClass(cls): cls.g = "def" print cls …
Ankur Agarwal
  • 23,692
  • 41
  • 137
  • 208
0
votes
1 answer

Culbera: Selecting things from dropdown list in an Android app

I am trying to test a drop down list with Culbera. My menu structure is as follows Main Page -- Program - Setup - Arm - Torque -- Test Now Arm displays (makes visible) a drop down list that shows the list of…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
0
votes
1 answer

Pressing buttons by 'text' on Android app using Culebra

I have a Android App that I am trying to test using culebra. The code is shown below. '''reated on 2017-02-08 by Culebra v12.5.3 __ __ __ __ / \ / \ / \ / \ ____________________/ __\/ …
liv2hak
  • 14,472
  • 53
  • 157
  • 270
0
votes
1 answer

Equivalent adb command for MonkeyDevice.installPackage() method

Is there exist any adb equivalent command for MonkeyDevice.installPackage() method? By using the installPackage()method in python script for monkeyrunner I'm able to install apk successfully. But when i use the command: adb install…
maruf
  • 599
  • 3
  • 6
  • 22
0
votes
1 answer

Monkeyrunner on Ubuntu 16.04 to install android apk file

I have installed Android SDK on Ubuntu 16.04 which runs on Virtual Box on my laptop. I have a Samsung Galaxy Tab connected to the laptop. The device is accessible to the Virtual Machine. I try to install my android app (apk file) using…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
0
votes
1 answer

How to get monkeyrunner to use a virtualenv

I am trying to write a monkeyrunner program that has some dependencies which are all nicely set-up in a virtualenv. Unfortunately, I can't seem to get monkeyrunner to be set-up with the right system path set-up to find the dependencies I need. I can…
Julian Cerruti
  • 1,918
  • 2
  • 16
  • 16
0
votes
1 answer

Android: Monkey vs Monkeyrunner for event simulation

I want to simulate events generated by a typical user to collect network traffic traces using the network monitor. I went through the Info. given in…
Vikash Balasubramanian
  • 2,921
  • 3
  • 33
  • 74
0
votes
0 answers

adb eror from monkeyrunner on rpi

I am trying to run monkeyrunner on my Raspberry Pi but having difficulty. First I installed the Android Tools adb package .... apt-get clean apt-get update apt-get upgrade apt-get install android-tools-adb .... which proceeded smoothly and…
0
votes
3 answers

Monkey UI test on app with login

I want to run the UI monkey test utility that comes with Android SDK on my app. The problem is that the first screen you get in my app is a login screen, and if you are not successful in that screen then you are not allowed to see anything. This…
MichelReap
  • 5,630
  • 11
  • 37
  • 99
0
votes
2 answers

Can't run monkeyrunner recorder

I'm trying to use monkeyrunner for my project. As I understood there are 2 basic scripts for that: monkey_recorder.py: https://android.googlesource.com/platform/sdk/+/ics-mr0/monkeyrunner/scripts/monkey_recorder.py monkey_playback.py:…
Aleksandr
  • 4,906
  • 4
  • 32
  • 47
0
votes
1 answer

Is there any Timer () or Clock () function in AndroidViewClient?

I'm using Androidviewclient for black-box testing of a GUI and I need to record the response time of a button; for example I need to know how long it takes for the next screen to appear from the time I click a "Next" button On a GUI.