Robotium 介绍
来源:互联网 发布:淘宝优惠券转换手机端 编辑:程序博客网 时间:2024/06/05 16:27
Robotium 框架概述
- Robotium是一款测试Android应用程序的开源的自动化测试框架(开源库)它是为了弥ActivityinstrumentationTestCase2(是Android单元测试框架Instrumentation的一个类)对集成测试不足而编写的。
- Robotium除了在Instrumentation API的基础上提供了更多的操作控件的函数外,还通过反射等手段,通过调用系统隐藏的功能,实现Instrumentation不支持的功能。
- Robotium对Instrumentation封装比较强的地方是控件的搜索。
Instrumentation简介
- Instrumentation测试框架是Android测试环境的核心,在这个框架下测试应用可以精确的控制应用程序,Instrumentation测试框架通过将主程序和测试程序运行在同一个进程来实现控制应用程序的功能。
- Instrumentation可以直接控制Android组件的生命周期(通过调用Activity中的方法)
- Instrumentation可以发送UI事件给应用程序(sendKeyDownUp等一系列函数)
- Instrumentation可以在执行期间检查程序的状态。
InstrumentationTestRunner简介
- InstrumentationTestRunner通过解析获取和建立目标测试用例和测试集然后指导测试的运行。
- InstrumentationTestRunner会在目标应用代码运行之前调用onCreate方法,这个方法里又调用了Instrumentation的start()方法,这个方法是用来创建一个新的Instrumentation的线程来运行测试用例。
环境与搭建
- JDK的安装与设置
- 安装Eclipse+ADT插件
- 下载Robotium.jar包
1 0
- Robotium介绍
- Robotium 介绍
- Robotium
- robotium
- robotium
- robotium
- Robotium
- Robotium
- Robotium
- Robotium
- Robotium
- robotium
- Robotium测试——API介绍
- 介绍Robotium+Orange实现androidUI自动化测试
- Robotium测试——API介绍
- 介绍Robotium+Orange实现androidUI自动化测试
- 介绍Robotium+Orange实现androidUI自动化测试
- 介绍Robotium+Orange实现androidUI自动化测试
- NYOJ 847 S+T
- 变量的scope
- Hadoop1.2.0在MAC下伪分布安装
- [摘要]Effective Objective-C 2.0(三 )
- 弱校联盟 2015-10-1 E
- Robotium 介绍
- zeromq源码分析–TCP连接处理流程
- java获取当前的系统
- 国外安卓开源ui集合
- test9.19
- Reverse Nodes in k-Group
- typename的用法
- 局域网主机间发包细节
- 类的继承