How to prevent a monkey from opening a status bar?

I want to use the Android monkey for stress testing my application, but the monkey opens the status bar and changes the settings on my phone.

To run the monkey, I use:

adb -s S5660a19e722f shell monkey -p com.lmmx.app -v -v -v 10000 --throttle 500 

I thought the -p com.lmmx.app should prevent this ... I use phones 2.3.5 and 2.3.6 for testing.

Any suggestions would be appreciated.

+8
android testing monkey
source share
3 answers

I have a 5.0 (Lollipop) phone, and I was able to do this using screen binding

  • activate it with settings> security> screen binding
  • press the app / multitasking switch button next to your home button.
  • in the bottom corner of each application in the recents application list there will be an icon icon

From there, you can run the monkey on your device without changing it.

+10
source share

I just created an application that will mask the status bar for the same purpose.

It simply adds a system overlay on top of the status bar , preventing anyone from accessing the status bar.

You can check it out here: github sources

It works great for our monkey tests, especially in launch applications.

Feel free to use it. If you want to download apk directly, you can find it here

+2
source share

Hide status bar when using isUserAMonkey () code

 if(ActivityManager.isUserAMonkey()){ //your code } 

Configuring the Monkey to ignore or prevent the status of the line is not possible, because you cannot limit any area on the screen or disable some functions in the Monkey keys.

+2
source share

All Articles