Questions tagged [android-monkey]

Questions related to use of monkey, a command-line tool in Android that allows developers to generate pseudo-random streams of user events such as clicks, touches, or gestures, as well as a number of system-level events on emulator and devices.

The Monkey is a command-line tool that can be run on any emulator instance or on a device. It sends a pseudo-random stream of user events into the system, which acts as a stress test on the application software being developed.

The Monkey provides options that can be grouped into four primary categories:

  1. Basic configuration options, such as setting the number of events to attempt.
  2. Operational constraints, such as restricting the test to a single package.
  3. Event types and frequencies.
  4. Debugging options.

Source: http://developer.android.com/tools/help/monkey.html

32 questions
13
votes
3 answers

Android Monkey: "No activities found to run, monkey aborted"

My package is named com.mywebsite.banana. I want to have a seed, so the test is repeatable: -s 13 I want to have a fairly low-level of verbosity: -v I want to run 500 psuedo-random commands: 500 I'm calling monkey like this: adb shell monkey -s 13…
ncrypticus
  • 505
  • 1
  • 4
  • 16
13
votes
1 answer

how to filter specific Activities to be tested by monkey using android.intent.category?

I'm trying to stress test my android application using the monkey exercise tool. By default the tool will exercise activities having category Intent.CATEGORY_LAUNCHER or Intent.CATEGORY_MONKEY according to the doc. package="my.android" …
felipe
  • 1,039
  • 1
  • 13
  • 27
12
votes
2 answers

Android Exerciser Monkey starts playing audio files at random

I'm running exerciser monkey to test my android app. As part of my app I play media files which give the pronunciation of a words. I've put the files in a directory where they aren't readable by the Android's Music player. However, the exerciser…
8
votes
3 answers

Change screen orientations during monkey run

I'm using monkey command to do some stress testing on my app. But i want to test it more with respect to screen orientations to detect and capture some heapupdates while changing orientations. I searched all over android official site about monkey…
msk
  • 135
  • 2
  • 13
7
votes
0 answers

Permission denial on monkey integration

I try to integrate monkey to my APP, while following error always comes: 10-13 09:16:24.682: INFO/System.out(274): :Monkey: seed=0 count=500... 10-13 09:16:24.682: INFO/System.out(274): :Monkey: seed=0 count=500... 10-13 09:16:24.704:…
user992570
  • 101
  • 1
  • 4
6
votes
1 answer

Monkey giving an odd error on android emulator

I'm letting monkey run on my app (via android emulator) using the following instruction: Monkey -p -v 5000 I am getting the following errors: 01-28 11:45:55.392: ERROR/MediaPlayerService(34): error: -2 01-28 11:45:55.392:…
Will Tate
  • 33,439
  • 9
  • 77
  • 71
5
votes
3 answers

Android monkey causes adapter notification exception in android.widget.HeaderViewListAdapter

I am having the common problem: java.lang.IllegalStateException: The content of the adapter has changed but List View did not receive a notification. Make sure the content of your adapter is no t modified from a background thread, but only from the…
mparaz
  • 2,049
  • 3
  • 28
  • 47
4
votes
3 answers

Android Test Monkey - Set Verbosity?

How can I change the verbosity level when running Test Monkey from the command line? These two commands work: adb shell monkey -p com.my.package 5000 adb shell monkey -p com.my.package -v 5000 The Developer docs say, "Each -v on the command line…
user359519
  • 711
  • 2
  • 16
  • 28
4
votes
2 answers

Android monkey triggers NullPointerException inside Spinner

I'm trying to find some hard-to-reproduce problems in my code. I used the monkey tool. But here, it appears that the problem is inside the Android spinner. Is that an API/framework problem? I tried it again with the same results. // CRASH:…
mparaz
  • 2,049
  • 3
  • 28
  • 47
3
votes
2 answers

Save Android Monkey random run to script format for later replay

Is there a way to save the random run of Android Monkey into a script with the proper format to later replay it by running: adb shell monkey -p -f script_file 1 EDIT: I know there is a seed flag (-s), but that's not what I want. I…
FlyingPumba
  • 1,015
  • 2
  • 15
  • 37
3
votes
2 answers

Monkey is not giving output: No activity found to run, Monkey aborted

I am new to Monkey testing tool, it says run the following command adb shell monkey -p "package name" -v 3 It is not clear to me whether to pass this command from inside the Project Directory or from the workspace where my Project is present. Each…
Rohit Jindal
  • 679
  • 1
  • 10
  • 21
2
votes
1 answer

android monkey test exclude some packages

How i run monkey test with exclude some packages? monkey --ignore-crashes --ignore-timeouts --kill-process-after-error --ignore-security-exceptions --throttle 200 -v 20000000 I want to test all activities of all packages in my device, but i do not…
Winton Hou
  • 861
  • 1
  • 6
  • 4
1
vote
2 answers

Start monkeyrunner script on multiple devices

I have a script that should be run on two devices at same time, this two devices are connected to one pc. How can I run the script on both devices at the same time ? is there some option like -s "SERIAL_NUMBER" , or something l
Lukap
  • 31,523
  • 64
  • 157
  • 244
1
vote
1 answer

Send only one click to monkeyrunner at specified position

Here is a more typical command line, which will launch your application and send 500 pseudo-random events to it: $ adb shell monkey -p your.package.name -v 500 but I am wondering how can I send only one click to my app at position 50,50
Lukap
  • 31,523
  • 64
  • 157
  • 244
1
vote
1 answer

Run customised android monkey test from adb shell

I have written a monkey test .py file and I just want to run that file from "adb shell" rather then using monkeyrunner so is there any way to run monkey test python file from adb shell? Below is the monkey --help section where I can see we can run…
Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65
1
2 3