简体   繁体   English

如何跨多个进程测试Android应用程序?

[英]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.

相关问题 如何在多个活动中测试Android应用程序? - How do you test an Android application across multiple Activities? 如何使用Robotium全面测试Android应用程序 - How do you functional test an Android application fully using Robotium 如何在Android和iphone上模拟和测试应用程序更新 - How do you simulate and test the Application Update on Android and iphone 如何跨多个活动安全地实现WakeLock - How do you safely implement WakeLock across multiple activites 如何跨多个 AOSP 项目创建补丁? - how do you create a patch across multiple AOSP projects? 我们如何在Android库模块中继承测试类? - How Do We Inherit Test Classes Across Android Library Modules? Android 中的 SharedPreferences 未在多个正在运行的进程中获取最近更新的值 - SharedPreferences in Android not getting recently updated values across multiple running processes 如何让android应用程序等待? - How do you make an android application wait? 您如何在Android应用程序中分层imageViews? - How do you layer imageViews in an android application? 跨多个进程的Otto / EventBus - Otto/EventBus across multiple processes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM