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?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With