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

查看:88
本文介绍了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天全站免登陆