测试Android的内存不足的情况​​下 [英] Testing Android for Out of Memory scenarios

查看:126
本文介绍了测试Android的内存不足的情况​​下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有测试机器人的出现内存不足的情况​​下的一个好办法吗?我希望能专门选择在仿真器上应用程序的运行,并迫使仿真器来回收其活性堆栈。我知道有办法通过仪器测试案例来验证你的活动的不同部分(http://developer.android.com/guide/topics/testing/activity_testing.html)。

Is there a good way of testing androids for out of memory scenarios? I'd like to be able to specifically choose an application running on the emulator and force the emulator to recycle its activity stack. I know there's a way to verify different parts of your activities via Instrumentation Test Cases (http://developer.android.com/guide/topics/testing/activity_testing.html).

知道是否有其他任何可以强制应用程序自动完成。

Wondering if there's anything else that can force the application to do it automatically.

推荐答案

有关使用MonkeyRunner工具是什么?你可以设定让它通过例如但是需要许多情况下运行屏幕旋转,整理活动,等等,等等,莫非服务器你的问题的目的。

What about using the MonkeyRunner tool? You can program it to run through however many scenarios needed e.g. screen rotations, finishing activities, etc. etc. It could server the purpose of your question.

http://developer.android.com/guide/developing/tools/monkeyrunner_concepts.html

还有猴子应用锻炼:

http://developer.android.com/guide/developing/tool​​s/ monkey.html

这篇关于测试Android的内存不足的情况​​下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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