Test running failed: Unable to find instrumentation info for: ComponentInfo

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zk673820543/article/details/52745532

在使用android studio进行单元测试的时候报错

Test running failed: Unable to find instrumentation info for: ComponentInfo{top.ljaer.www.phonemanager.test/android.test.InstrumentationTestRunner}
Empty test suite.

解决方法

点击Edit Configurations进行编辑
EditConfigurations

将Specific instrumentation runner改为com.android.test.runner.MultiDexTestRunner
MultiDexTestRunner

再次点击运行

单元测试正常

$ adb shell am instrument -w -r   -e debug false -e class top.ljaer.www.phonemanager.BlackNumTest#testQueryAllBlackNum top.ljaer.www.phonemanager.test/com.android.test.runner.MultiDexTestRunner
Client not ready yet..
Started running tests
Tests ran to completion.
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页