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

编程知识 更新时间:2023-05-03 03:43:27

在使用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进行编辑

将Specific instrumentation runner改为com.android.test.runner.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.

更多推荐

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

本文发布于:2023-04-30 10:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/01bf4995caa639dc3737fdf89225f34d.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:failed   Unable   Test   running   info

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 114118文章数
  • 28915阅读数
  • 0评论数