I can run Robotium test but cannot debug it

折月煮酒 提交于 2019-12-20 03:43:21

问题


I'm testing an apk for which I don't have sources on my phone. I have ensured that I have the same certificates in both the test and app apks. I'm able to run my tests fine from eclipse, but when I try to debug through "Debug As", eclipse appears to be stuck launching the tests. In the progress bar at the bottom, I see "Launching: Creating source locator...". I have set breakpoints in the appropriate spots, and nothing that I can see in the logcat output to suggest that there's a crash in either the test process or the app process. Any ideas on what the problem might be or how to investigate further?


回答1:


I had similar problems.

The solution for me was that there may only be one DDMS instance running. So for example if I had the tools/ddms.bat running while at the same time eclipse was opened, then the debugging didn't work for me.




回答2:


I posted as well for the same question, and I figured it out. cannot run as debug robotium junit test

So there is two requirements to get this to work:

  1. you need to have the AUT (App Under Test) setup in your workspace 2. the AUT must be debuggable=true (manifest file)
  2. my mistake was that because I wanted to debug the test only I did not think that I needed the AUT project also.



回答3:


For me the solution was that I needed to check my device display. I realised that there was a dialog with a question, but since this dialog blocked the device, the test could not run...



来源:https://stackoverflow.com/questions/11573833/i-can-run-robotium-test-but-cannot-debug-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!