How to test Android Application;s UI using Monkey

醉酒当歌 提交于 2019-12-11 15:47:18

问题


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?


回答1:


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: 
                          ^ ???


来源:https://stackoverflow.com/questions/9793849/how-to-test-android-applications-ui-using-monkey

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!