TestProject Forum

How to limit Android Monkey to just the app?

Hello,

As the question suggests I am trying to learn how to use Android Monkey addon. Now, while it’s easy to set it up (or at least I thought) the step involving the addon is going haywire by clicking outside the app and never only focusing on the app and the buttons there.

Is there a reason for this? How can I limit the behavior to just app and its functions

Hi @rijadsk,
Can you please try to limit the PctAppSwitch and the PctSysKeys, to try and limit to 0 possibilities that an event each exit the app will occur?

Feel free to tag me if you have any questions.

Hello @Amit.Lacher,
I limited PctAppSwitch, PctSysKeys, Nav, Flip, PinchZoom and AnyEvent to 0
PctTouch is at 30, PctMotion 35, PctTrackball 35

Package has the correct name of the apk/app

Behavior is still quite random - it will pull down notification bar, make screenshots and leave the app
Sometimes it doesn’t stop after the test has stopped or even after ALT+S

If I am probably doing something wrong and if I can help with more info, feel free to ask.

I have also tried vanilla adb shell monkey with following command line:
adb shell monkey -p [package.name] -v 2000 --throttle 100 --pct-touch 100 --pct-motion 100 --pct-trackball 0

It still makes trackball and nav gestures.
The problem might be monkey itself?