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
1 answer

Is it possible to listen bluetooth states in Android using Monkey runner

Can anyone kindly let me know if the Bluetooth state(ie., ON, OFF, Connected, Searching etc) be detected using the help of Monkey Runner.
0
votes
1 answer

Passing variable value from android activity to python script

Is it possible to pass variable value from activity to python. I am having file duration,i want to pass it to python script and set Monkeyrunner.sleep(fileduration) in my script. how can i be able to do that. Regards Mayank
Mayank Agarwal
  • 447
  • 1
  • 7
  • 21
0
votes
2 answers

Read text file into array using python

I have a textfile newfile.txt which contains following info: http://filefirst.txt http://filesecond.txt http://filethird.txt how should i read this file using python such that line[0] = http://filefirst.txt line[1] = http://filesecond.txt ... and…
Mayank Agarwal
  • 447
  • 1
  • 7
  • 21
0
votes
1 answer

Android monkey runner usage

I have a simple requirement to run a set of files on url on MediaPlayer. I am writing a script to do this. There is a variable mediapath in MainActivity.java which takes url path. Is it possible to give this variable url value using android…
Mayank Agarwal
  • 447
  • 1
  • 7
  • 21
0
votes
1 answer

Slide from right to left on screen using MonkeyRunner in android device

I am doing some automation using monkey runner, so for that i want auto slide from left to right on the screen using monkey runner? So any one know how to do this? Vertical drag i know because we have drag() API. Thanks in adv....
Mayank
  • 1
  • 2
0
votes
1 answer

Importing monkeyrunner into python ViewClient

I am interested in making use of the ViewClient extension for MonkeyRunner having run into Broken Pipe issues with pure MonkeyRunner. I need to still use X/Y coordinates in the device.press(...), device.touch(...), device.drag(...) functions for…
mactwixs
  • 402
  • 1
  • 6
  • 15
0
votes
1 answer

Automation Blackbox testing render scripts

I need to find a solution to test some render scripts. Basically are some applications that display some animations on the screen. If the animation is displayed the test passes if not it fails. I don't have the sources for the apk. Until now using…
X None
  • 9
  • 1
0
votes
1 answer

Android monekyrunner test

Hi All i am a new bie to use monkey script. Can anybody tell me what I have to do to test the whol application. ALL the click and specially how to wring log file for out put. I tried code so far but it couldnt test my whole app. I have two…
Me Malik
  • 409
  • 2
  • 5
  • 13
0
votes
1 answer

Something wrong with ViewClient.connectToDeviceOrExit()

I'm recently started to use python with mobile app automation, as i decided to use python, the main instruments that I've found were monkeyrunner and androidviewclient. But there is the first issue with which i dont know what to do: package =…
alohamaloha
  • 147
  • 1
  • 12
0
votes
2 answers

Key Injection using MonkeyRunner in android?

I want to repeat some steps of testing an application. What i think ,first time when i perform the task on that application i will record that steps and after that i want to perform that steps in a loop. I want to perform both steps recording…
Aman Arora BB
  • 190
  • 1
  • 12
0
votes
0 answers

How to create a shortcut with monkeyrunner broadcastIntent

How to create a shortcut with monkeyrunner broadcastIntent()? Can I do this? device.broadcastIntent("com.android.launcher.action.INSTALL_SHORTCUT", app_pkg_name)
0
votes
2 answers

Emma code coverage for Android manual testing

I tried setting up my project using instructions on below post by Diego: http://dtmilano.blogspot.com/2011/11/obtaining-code-coverage-of-running.html On trying to launch the app using adb shell am instrument -e coverage true -w ... I get below…
user1819441
  • 127
  • 2
  • 12
0
votes
1 answer

AndroidViewClient - NullPointerException

I'm trying to make a script using MonkeyRunner & AndroidViewClient to test my own application. I set the all environment variables in my Mac OS X. Of course, I can test my android application with a terminal command like './monkeyrunner…
Dae Ho Ma
  • 13
  • 3
0
votes
1 answer

Monkeyrunner.sleep(5) Not working

MonkeyRunner.sleep (5) gives an error when I type. I wonder why I wrote no problem 3? Google translate from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage device = MonkeyRunner.waitForConnection() device.touch(112, 149,…
Gokhan
  • 1
  • 1
0
votes
1 answer

How to check status of android phone screen is locked or unlocked using monkeyrunner

i want to know how to get the status of android phone screen whether its locked or unlocked using monkeyrunner . please help . Thanks in advance
user
  • 65
  • 1
  • 11