Android中单元测试
16lz
2021-01-23
在AndroidManifest.xml中
在<application>中添加
<uses-library android:name="android.test.runner"/><!-- 单元测试 -->
在<manifest>中添加
<instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="cn.edu.database" android:label="Tests my app"></instrumentation>
编写测试类,该类继承AndroidTestCase
public class MyTest extends AndroidTestCase {public void testSava() throws Exception{new ProductService(this.getContext()).save();}}
更多相关文章
- Android Instrumentation自动化测试框架
- Android外设存储设备的访问及测试
- Android中的自动测试(1)
- android随笔06——单元测试
- Android摄像头视频帧数据测试代码
- android sqilte3数据库大小的测试
- Android自动化测试之monkeyrunner基本要素(七)
- Android添加单元测试的方法与步骤
- 关于android单元测试结合SAX解析xml文件初步分析