android Junit demo
来源:互联网 发布:2016最新伤感网络歌曲 编辑:程序博客网 时间:2024/05/20 20:43
package com.sondon.dhjk.test;import com.sondon.dhjk.utils.LogUtil;import junit.framework.TestCase;public class Test extends TestCase {private static final String TAG = "Test";/** * 构造函数 * @param name */public Test(String name) {super(name);}public void testMytest(){LogUtil.i(TAG, "测试方法");}/** * Sets up the fixture, for example, open a network connection. This method * is called before a test is executed. */protected void setUp() throws Exception {super.setUp();LogUtil.i(TAG, "setUp");}/** * Tears down the fixture, for example, close a network connection. This * method is called after a test is executed. */protected void tearDown() throws Exception {super.tearDown();LogUtil.i(TAG, "tearDown");}}
Androidmanifest.xml文件:
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="<span style="font-family: Arial, Helvetica, sans-serif;">com.sondon.dhjk</span><span style="font-family: Arial, Helvetica, sans-serif;">"</span> android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="8" /> <application android:icon="@drawable/icon" android:label="@string/app_name"> <uses-library android:name="android.test.runner"/> <!--不可修改--> <activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <instrumentation android:name="android.test.InstrumentationTestRunner" <!--不可修改-->android:targetPackage="<span style="font-family: Arial, Helvetica, sans-serif;">com.sondon.dhjk</span><span style="font-family: Arial, Helvetica, sans-serif;">" <!--跟package包名相同--></span>android:label="Testing"><!--可写可不写--></instrumentation></manifest>
log日志:
0 0
- android Junit demo
- junit spring demo
- junit的demo
- JUnit 和 Android JUnit
- maven + junit + webdriver 简单demo
- maven + junit + webdriver 简单demo
- android junit
- Android-JUnit
- android junit
- Android Junit
- Android Junit
- Android-JUnit
- Android Junit
- Android Junit
- 世界上最简单的 junit demo 程序
- Spring整合Junit框架进行单元测试Demo
- Android下使用JUnit
- Android下使用JUnit
- 海量数据查找唯一数据问题
- AFNetworking速成教程(1)--cpf
- Facade模式及其与Adapter模式和Proxy模式的区别
- OpengL画cos,sin,三角形等图形
- jmx 学习笔记二
- android Junit demo
- java数组实现的树
- 标准模板库STL
- 百度大数据 CMO的新左脑-百度-喻友平
- Cocos2d-x 多分辨率适配完全解析
- 对象关系数据库
- Longest Palindromic Substring
- oracle内存自动管理
- jxl 删除excel重复的行