如何重新启动杀害Android应用程序与robotium测试 [英] how to restart killed android application in testing with robotium

查看:163
本文介绍了如何重新启动杀害Android应用程序与robotium测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用robotium测试的APK。在这个程序,我有一个按钮,杀死应用进程,并重新推出它。我想用robotium测试该业务情景。 当我点击通过robotium按钮,应用程序被杀害的预期,但我看不到但─它重新登场。

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.

推荐答案

您无法通过robotium做到这一点,仪器测试住在同一进程中的应用程序(你可以看到这一点,如果你看一下logcat中),这意味着,当你杀死你的应用程序处理试验死与它一起。

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.

这篇关于如何重新启动杀害Android应用程序与robotium测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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