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 文檔