Android 用Monkey测试应用程序

Android 用Monkey测试应用程序,android,adb,monkey,Android,Adb,Monkey,我正在尝试使用Monkey来测试我的应用程序的UI,但到目前为止还没有成功。我已将设备连接到计算机,并尝试使用adb运行monkey 我使用的命令是: adb shell monkey -p com.cooper.redditvideo -v 500 错误消息是: :Monkey: seed=1392819534260 count=500 :AllowPackage: com.cooper.redditvideo :IncludeCategory: android.intent.catego

我正在尝试使用Monkey来测试我的应用程序的UI,但到目前为止还没有成功。我已将设备连接到计算机,并尝试使用adb运行monkey

我使用的命令是:

 adb shell monkey -p com.cooper.redditvideo -v 500
错误消息是:

:Monkey: seed=1392819534260 count=500
:AllowPackage: com.cooper.redditvideo
:IncludeCategory: android.intent.category.LAUNCHER
:IncludeCategory: android.intent.category.MONKEY
现在我可以告诉它,它试图说,它找不到一个具有上述两个类别的活动能够运行,但是我已经在我的清单中指定了这一点

Manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.cooper.redditvideo"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.cooper.redditvideo.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
                <catagory android:name="android.intent.category.MONKEY" />
            </intent-filter>
        </activity>
        <activity android:name="com.cooper.redditvideo.AboutActivity"
            android:label="About"></activity>
    </application>

</manifest>


有什么建议吗?

您的设备上是否安装了应用程序?您得到的实际错误是什么?是的,安装在我设备上的应用程序是我的主要开发平台。错误是monkey无法运行,因为无法找到具有LAUNCHER和monkey类别的活动。请尝试
adb shell monkey-p com.cooper.redditvideo-c android.intent.category.LAUNCHER-c android.intent.category.monkey-v 500
,您需要发布实际错误。@shoerat我尝试过,得到了几乎相同的结果,似乎我可以输入任何包名,它会显示出来。