Android 测试用例在调试模式下不起作用 [英] Android Test cases not working in debug mode

查看:48
本文介绍了Android 测试用例在调试模式下不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法调试 android Instrumentation 测试用例(使用 espresso 和 UiAutomator)

I am not able to debug android Instrumentation test cases (using espresso & UiAutomator)

但是早期的测试用例调试工作正常,但最近更新它不再工作了.它总是在实例化单元测试时被激发

But earlier test cases the debugging was working fine but with recent update it is not working anymore. It gets always struck up at instantiating unit test

我可以在命令窗口中看到它正在尝试启动 PACKAGE_NAME**.test**

I can see in command window that it's trying to launch PACKAGE_NAME**.test**

 adb shell am instrument -w -r   -e debug true -e class PACKAGE_NAME.LanguageScreenTest#testSelectImportant PACKAGE_NAME**.test**/android.support.test.runner.AndroidJUnitRunner

推荐答案

如果我使用 AndroidOrchestrator,对我来说也是一样.如果您真的不需要使用它运行测试,或者至少在您想要调试时将其关闭.

The same thing for me in case i use AndroidOrchestrator. Turn it off if you dont really need to run the tests with it or, at least, when you want to debug.

(已经很长时间了,但只是为了后来可能陷入这个问题的其他人)

这篇关于Android 测试用例在调试模式下不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆