Android JUnit Test的使用
来源:互联网 发布:演艺行业的二手数据库 编辑:程序博客网 时间:2024/05/21 11:02
http://blog.csdn.net/justin_12/article/details/7279953
下面 我简单的总结一下android单元测试的一些要求吧,
1、你要实现单元测试的类必须得继承AndroidTestCast类,
2、你单元测试中的那个方法必须以Test开头:Test+你的方法名,
3、你运行这个单元测试类的方法,一定选中这个以Test开头的方法,再单击右键,选中Android JUnit Test方可,
4、在你的项目的功能配置文件中必须加入 <instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="你的单元测试所在包名" android:label="Tests for My App" />,这一行加在<application>节点外面,而<uses-library android:name="android.test.runner" />则要加在<application>里面,组件节点外面,如<Activity>节点外面
5、你单元测试中的那个方法必须抛出异常 ,在你的方法加上:throws throwable、
6、使用结构体为:空参数结构体,类型为public
0 0
- Android JUnit Test的使用
- Android JUnit Test的使用
- Android JUnit Test for Eclipse使用入门
- Android的JUnit Test单元测试(调试)
- android junit test问题
- android junit test问题
- android junit test
- Android JUnit Test
- Android Junit Test Process
- Android Junit Test
- android-单元测试(Android JUnit Test)
- Android - JUnit Test(单元测试)
- Android - JUnit Test(单元测试)
- 关于Android Junit test 配置
- Eclipse下使用JUnit Test
- Junit Test使用样例
- Android Test Case在JUNIT下的应用
- Junit下Debug调试与直接使用Run As的Junit Test测试的结果差异
- javacc 6 生成 C++
- iGrimace 安装检查及卸载
- 求最长连续公共子串
- 如何关闭ipv6
- python学习之--Hello World
- Android JUnit Test的使用
- iOS系统 查看40位设备标识(UDID)
- Intellij IDEA 14.0 破解jrebel6.0.2
- strcmp,stricmp,strcmpi的区别
- struts上传文件,验证失败表单数据丢失的原因
- Linux目录/etc/init.d 与 /etc/rc.d/init.d
- 海量数据的查询优化及分页算法方案
- Linux那些事儿之我是Sysfs(8)一起散散步-pathwalk
- CoreAnimation的学习备忘录