Android 上的 UI 压力测试
有没有办法让我做一种 UI 压力测试,类似于猴子跑步者的测试。
我希望我的压力测试仪在屏幕上随机单击,直到出现提示。
但是,我希望能够检测是否出现对话框,然后我想输入一些值,或者如果提示我上传某些内容,我将上传一张随机图片。 Monkey runner 不具备知道出现什么对话框的功能吗?我尝试配置的压力测试仪必须是一款适合所有压力测试仪。
is there a way for me to do a sort of UI Stress test, similar to that of monkey runner.
I want my stress tester to click randomly on the screen until something is prompted.
however, i want to be able to detect if a dialog box comes up, then i want to put in some values, or if there is a prompt for me to upload something, i'll upload a random picture. Monkey runner does not have the functionality of knowing what dialog boxes come up right? This stress tester that i am trying to configure has to be a one size fits all stress tester.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
猴子本身不知道你的 UI 正在显示什么,但你的应用程序知道。您可能会发现
isUserAMonkey
< /a> API 很有用。虽然它的存在给许多人带来了乐趣,但它的存在适用于您希望应用程序对猴子和真实用户的行为有所不同的情况。The monkey itself doesn't know what your UI is showing, but your app does. You might find the
isUserAMonkey
API useful. While its existence has been a source of amusement for many, it exists for these cases where you want your app to behave differently for a monkey than for a real user.查看robotium。它还支持Android应用程序的黑盒UI测试。
Take a look at robotium. It also supports black-box UI testing of Android applications.
您可以尝试使用 testobject.com 来执行此操作:
函数 randomInput(...) 正在调用 Exercerer Monkey。它并不完全防弹,但可能对你的情况有用。
This is how you could try to do this with testobject.com:
The function randomInput(...) is invoking the Exerciser Monkey. It's not completely bullet-proof, but might do the trick in your case.