单元测试
2016-02-21 10:27
260 查看
首先要写一个类继承AndroidTestCase
然后在清单文件里配置
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.example.junit" >要测试的包名
</instrumentation>
和application是同级节点
还要配置
<uses-library android:name="android.test.runner"/>
和activity是同级节点
然后在清单文件里配置
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.example.junit" >要测试的包名
</instrumentation>
和application是同级节点
还要配置
<uses-library android:name="android.test.runner"/>
和activity是同级节点
package com.example.junit; import android.test.AndroidTestCase; public class Text extends AndroidTestCase { public void test(){ System.out.println("已经启动了"); } }
相关文章推荐
- CodeForces 630 J. Divisibility(数论)
- [自考]计算机网络原理
- java发送短信系列之限制发送频率
- java中的随机数Random
- PHP常见漏洞攻击分析
- JSON简介以及用法汇总
- android从图库(gallery)选择一张图片
- hdu 1151 Air Raid(最小路径覆盖)
- Android问题集(七)——webview 使用问题三四个
- 021: class, objects and instance: 特殊方法
- 信号完整性分析
- 《数据结构与算法分析(c 描述)》—— 第四章笔记
- [BZOJ 4066]简单题
- dom4j
- CBLAS的安装与使用
- android MulticastLock
- CodeForces 630 I. Parking Lot(组合数学)
- 程序员面试笔试宝典学习记录(一)(常见面试笔试题目)
- Matrix(多线程dp)
- Android 实现多个EditText互相监听遇到的问题及解决方法