Android:???????Junit??????
???????????? ???????[ 2013/8/1 15:17:26 ] ????????
?????????????У?????android??????????????????в?????????Junit???????????????Android????????ü???????Junit?п?????????????????????????????????????..........
?????????????????AndroidManifest.xml?м??????????:
<?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" />
</manifest>
????????targetPackage?????????????package??????????????????????????
?????????????д??????????????????????????????“Run As”--“Android Junit Test” ????
import android.test.AndroidTestCase;
import android.util.Log;
public class XMLTest extends AndroidTestCase {
public void testSomething() throws Throwable {
Assert.assertTrue(1 + 1 == 3);
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11