<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="hb.learn.junit"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<!-- 在本应用中导入需要使用的包,放在application里面activity外面 -->
<uses-library android:name="android.test.runner" />
<activity android:name=".JunitTestActivity"
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>
<!-- 记住这个一要放在application外面,不然会出现配置错误 信息 -->
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="hb.learn.junit" android:label="Tests for My App" />
hb.learn.junit 这个东西一定要和上面的一模一样才可以
</manifest>
- import android.test.AndroidTestCase;
- import android.util.Log;
- public class XMLTest extends AndroidTestCase {
- public void testSomething() throws Throwable {
- 开始测试吧
- }
- }