纯粹做个笔记
root@hammerhead:/data/local/tmp #uiautomator runtest /data/local/tmp/appsimulation.jar -c com.dkxy.appsimulation.AppSimulationTestCase#main INSTRUMENTATION_STATUS: numtests=1 INSTRUMENTATION_STATUS: stream= com.dkxy.appsimulation.AppSimulationTestCase: INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner INSTRUMENTATION_STATUS: test=main INSTRUMENTATION_STATUS: class=com.dkxy.appsimulation.AppSimulationTestCase INSTRUMENTATION_STATUS: current=1 INSTRUMENTATION_STATUS_CODE: 1 INSTRUMENTATION_STATUS: numtests=1 INSTRUMENTATION_STATUS: stream= Error in main: java.lang.NoClassDefFoundError: com.dkxy.appsimulationcommon.BaseSimulation at com.dkxy.appsimulation.AppSimulationTestCase.main(AppSimulationTestCase.java:22) at java.lang.reflect.Method.invokeNative(Native Method) at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160) at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96) at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91) at com.android.commands.uiautomator.Launcher.main(Launcher.java:83) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243) at dalvik.system.NativeStart.main(Native Method) INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner INSTRUMENTATION_STATUS: test=main INSTRUMENTATION_STATUS: class=com.dkxy.appsimulation.AppSimulationTestCase INSTRUMENTATION_STATUS: stack=java.lang.NoClassDefFoundError: com.dkxy.appsimulationcommon.BaseSimulation at com.dkxy.appsimulation.AppSimulationTestCase.main(AppSimulationTestCase.java:22) at java.lang.reflect.Method.invokeNative(Native Method) at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160) at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96) at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91) at com.android.commands.uiautomator.Launcher.main(Launcher.java:83) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243) at dalvik.system.NativeStart.main(Native Method) INSTRUMENTATION_STATUS: current=1 INSTRUMENTATION_STATUS_CODE: -1 INSTRUMENTATION_STATUS: stream= Test results for WatcherResultPrinter=.E Time: 0.053 FAILURES!!! Tests run: 1,Failures: 0,Errors: 1 INSTRUMENTATION_STATUS_CODE: -1
比较奇葩的是,通过adb shell执行的命令没有任何的提示
C:\Users\win10>adb shell "uiautomator runtest /data/local/tmp/appsimulation.jar -c com.dkxy.appsimulation.AppSimulationTestCase" INSTRUMENTATION_STATUS: stream= Test results for WatcherResultPrinter= Time: 0.007 OK (0 tests) INSTRUMENTATION_STATUS_CODE: -1
实际有效命令:
uiautomator runtest /data/local/tmp/appsimulation.jar /data/local/tmp/appsimulationcommon.jar -c com.dkxy.appsimulation.AppSimulationTestCase#main
原文地址:https://www.jb51.cc/javaschema/282570.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。