Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use android monkey

I am a little confused on how to actually use monkey, i thought you were supposed to power on your emulator and go into terminal editor and type:

$ adb shell monkey -p insert.my.package.name.here -v 500

since that did not work (error, adb: permission denied)

i tried monkey -p insert.blah.blah -v 500 and this comes up that it has been killed, what am I doing wrong?

like image 297
Demonicpenguin Avatar asked Oct 26 '11 01:10

Demonicpenguin


People also ask

How do you use monkey tool?

Basic use of the Monkey Because the Monkey runs in the emulator/device environment, you must launch it from a shell in that environment. You can do this by prefacing adb shell to each command, or by entering the shell and entering Monkey commands directly.

How do we do black box testing in an Android app?

To black box test an Android app simply need access to the target devices to test on, as well as some mechanism for accessing the application package file and installing it on each device. This could be an internal website, or via USB, or what have you.

What is meant by monkey testing?

Definition: Monkey testing is a type of software testing in which a software or application is tested using random inputs with the sole purpose of trying and breaking the system. There are no rules in this type of testing. It completely works on the tester's mood or gut feeling and experience.


1 Answers

It's probably trying to talk to a device over your USB port.

You probably just need to add an -e in there to tell adb to connect to the emulator:

$ adb shell monkey -p insert.my.package.name.here -v 500

(Or -s serialnum if you have more than one emulator running.)

See Directing commands in the ADB docs.

like image 125
tangentstorm Avatar answered Sep 28 '22 06:09

tangentstorm