Monkey is not giving output: No activity found to run, Monkey aborted

扶醉桌前 提交于 2020-01-11 06:30:12

问题


I am new to Monkey testing tool, it says run the following command

adb shell monkey -p "package name" -v 3

It is not clear to me whether to pass this command from inside the Project Directory or from the workspace where my Project is present.

Each time I run I get the following error

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

Thanks in Advance


回答1:


When you're running a command using adb shell, the command is run on the connected Android device or emulator. So the current working directory for the command would be that of the device. How would it matter whether you execute it "from inside the Project Directory or from the workspace where my Project is present"?

Looking at the error you got, it's clear that you've not given the allowed package name correctly.




回答2:


Check your application whether it has an Activity (android.intent.category.LAUNCHER)or not in manifest file. If its not present you will get this error. Actually i am also testing mobile apps with monkey tool and got this error. If you have any doubt create a sample project with Activity & intent filter and run monkey tool.



来源:https://stackoverflow.com/questions/13838159/monkey-is-not-giving-output-no-activity-found-to-run-monkey-aborted

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