Robotium是什么?

介绍

Robotium是一款国外的Android自动化测试框架,主要针对Android平台的应用进行黑盒自动化测试,它提供了模拟各种手势操作(点击、长按、滑动等)、查找和断言机制的API,能够对各种控件进行操作。Robotium结合Android官方提供的测试框架达到对应用程序进行自动化的测试。另外,Robotium4.0版本已经支持对WebView的操作。Robotium对Activity,Dialog,Toast,Menu都是支持的。

优缺点

优点:
  • Easy to use
  • Tests are easy to read
  • Doesn`t require access to source code. Can test an APK
  • Can identify elements easily
  • Can fall back on default Android framework
  • Great support
        缺点:
  • Not all views and objects are currently supported (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也是支持的。

不错的学习的网站

         http://www.robotium.cn/


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值