UiAutomator使用命令行运行测试

时间:2017-03-27 02:39:19

标签: junit uiautomator

我是初学者,我正在尝试使用命令行运行uiautomator测试文章:

C:\ Users \ User \ AndroidStudioProjects \ MyApplication \ app \ src \ androidTest \ java> adb shell am instrument -w com.example.user.myapplication / Homologation.java

但它返回了以下错误:

INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for:                 ComponentInfo{com.example.user.myapplication/Homologation.java}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED:         com.example.user.myapplication/Homologation.java
     at com.android.commands.am.Am.runInstrument(Am.java:1055)
     at com.android.commands.am.Am.onRun(Am.java:297)
     at com.android.commands.am.Am.main(Am.java:91)
     at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
     at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:258)
     at dalvik.system.NativeStart.main(Native Method)
有人知道这是什么意思吗?

1 个答案:

答案 0 :(得分:0)

此错误似乎是在appium或您所需的功能中输入的错误包名。请检查。