Robotium 是一个基于Android 应用程序的自动化黑盒测试工具。它简化了测试用例的编
写,并且能够编写出功能强大,健壮性很强的黑盒测试用例。运用Robotium,测试人
员能够编写测试用例,系统测试,验收测试方案等。同时Robotium 还能够跨越多个
Android 的Activity,进行测试。
Robotium 对Activity,Dialog,Toast,Menu 都是支持的。
The Good:
•Easy to use
•Tests are easy to read
•Doesn't require access to source code. Can test a APK
•Can identify elements easily (with caveat...more on this later)
•Can fall back on default Android framework
•Great support
The Bad :
•Not all views and objects are currently supported e.g. SlidingDrawer
•Slower compared to unit testing
•Single class containing all methods, Selenium 1 style. This is going to get messy :)
Robotium 的用法很简单,同时也是很有效的黑盒测试工具。我们在使用时通过Solo 对象的
实例,可以创建丰富的测试用例。Solo 对不仅activity 支持,对Toast,Menu,Dialog 也是支
持的。Solo 的更多用法请参考javadoc 文档