robotium

电脑杂谈  发布时间:2017-03-14 21:02:50  来源:网络整理

Robotium is an open-source test framework for writing automatic black-box test cases for Android applications.[1][2] With the support of Robotium, test case developers can write function, system and acceptance test scenarios, spanning multiple Android activities. Robotium can be used both for testing applications where the source code is available and applications where only the APK file is available and the implementation details are not known. Robotium can be used with all the different build automation tools.[3]

The framework is released under Apache License 2.0. Its founder and main developer is Renas Reda. Version 3.5.1 was released on October 11, 2012.

Robotium is similar to Selenium, but for Android. It has support for Android features such as activities, toasts, menus and context menus.

用户界面自动测试有助于保持你的软件的质量高,并帮助你发现如果你的代码变化影响实际使用的情况下实施。当您创建Android应用程序,你想成为许的测试人员的帮助下,他们没有能够测试。人类同一应用程序的多个设备上的UI测试是浪费时间,所以你要通过自动化来消除它,就像你会做与硒用于Web应用程序。对于Android应用程序中,也有类似的所谓Robotium测试工具。robotium这是一个UI测试工具模拟触摸,点击,打字,和其他用户的Android应用程序相关的行动。编写测试使用Robotium是很容易,因为你可以看到从下面。

Bitbar,我工作的公司,创造了一个持续集成环境的自动化UI测试Android应用程序。下面是一些使用它的好处:

每个UI测试(Robotium中创建)自动执行提交。

对许多配置,真正的设备和目标,模拟真实设备测试

视觉试验结果呈现在人类友好形式

画面拍摄的UI测试过程中,所以你可以看到你的应用程序看起来如何在真实设备

使用Robotium作为一个例子,我会告诉你如何创建一个测试我的Andr​​oid应用程序用于监测哈德森的工作的。

创建Android的测试项目:

如果你是Eclipse用户(和您的Eclipse ADT插件),你应该打开项目,你想测试,然后选择菜单文件→新建→(→安卓)→Android的测试项目。创建现有的Android项目的测试项目。robotium要运行它选择Run As - >运行,由于Android的JUnit测试。


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-37528-1.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...