[英]How do you test an Android application across multiple processes?
I have the whole project for tablets with resources and already have bunch of test cases written in combination of Robotium, Android and JUnit APIs 我有整个项目的平板电脑资源,已经有一堆结合Robotium,Android和JUnit API编写的测试用例
In a project which under testing is used special attribute for one of activities android:process=":remote"
. 在一个正在测试的项目中,使用特殊属性
android:process=":remote"
。 At the point where activity with this attribute already loaded I can use Robotium methods but can't get access to the elements on current screen. 在已加载此属性的活动点,我可以使用Robotium方法,但无法访问当前屏幕上的元素。 So seems like I should relaunch instrumentation or initialize new instance of
Solo
. 所以我似乎应该重新启动检测或初始化
Solo
新实例。 I tried to do this, but no help, seems like I can't relaunch it in other process from my test. 我试图这样做,但没有帮助,似乎我不能在我的测试的其他过程中重新启动它。 Maybe someone have an experience of testing such kind of applications and know how to implement it with
Robotium
or using directly android.test API? 也许有人有测试此类应用程序的经验,并知道如何使用
Robotium
或直接使用android.test API实现它?
You can use IUAutomator, but it works on api >= 16: http://developer.android.com/tools/testing/testing_ui.html 您可以使用IUAutomator,但它适用于api> = 16: http : //developer.android.com/tools/testing/testing_ui.html
You can always use monkey runner: http://developer.android.com/tools/help/monkeyrunner_concepts.html however it's based on x,y 你可以随时使用monkey runner: http : //developer.android.com/tools/help/monkeyrunner_concepts.html但它基于x,y
There is no option to use robotium, neither instrumentation to test multiple processes. 没有使用robotium的选项,也没有选项来测试多个进程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.