Search code examples
androidstress-testingmonkey

How to test Android Application;s UI using Monkey


I am trying to test my Android app using Monkey. There they say use this command,

$ adb shell monkey -p your.package.name -v 500

In my app, I have package name as travelceylon\client so if I give the command as:

adb -e shell monkey -p travelceylon\client -v 1000

...it will show errors like this:

:Monkey: seed=0 count=1000
:AllowPackage: travelceylonclient
:IncludeCategory: android.intent.category.LAUNCHER
:IncludeCategory: android.intent.category.MONKEY
** No activities found to run, monkey aborted.

So what I am doing wrong here?


Solution

  • You should separate the parts of your package name with dots:

    adb -e shell monkey -p travelceylon.client -v 1000
    

    As you can see in the error, it omits the \ from the package name:

    AllowPackage: travelceylonclient :IncludeCategory: 
                              ^ ???