how to restart killed android application in testing with robotium

蓝咒 提交于 2019-12-02 09:38:01

问题


I am testing an apk using robotium. In this app, I have a button which kills the app process and relaunches it. I want to test this scenario using robotium. When I click on the button through robotium, app is killed as expected but I cannot see that- it relaunches.


回答1:


You cannot do this via robotium, Instrumentation tests live in the same process as your application (you can see this if you look at logcat) this means that when you kill your applications process the tests die along with it.



来源:https://stackoverflow.com/questions/13802233/how-to-restart-killed-android-application-in-testing-with-robotium

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