Android?????Junit???е??????
???????????? ???????[ 2015/9/25 14:14:52 ] ????????Android ???????
????????????????????????????????????????????Android?н??е?Junit????????????????????????????AndroidTestCase????????????????????AndroidManifest.xml?????????????
????????Test??????AndroidTestCase??
package com.example.android_sms.test;
import com.example.android_sms.MainActivity;
import com.example.android_sms.service.CalcService;
import android.test.AndroidTestCase;
public class TestCalcService extends AndroidTestCase{
public void testAdd(){
CalcService service=new CalcService();
int result=service.add(6?? 1);
assertEquals(7?? result);
}
}
?????????????????
????<!-- instrumentation??????manifest????? -->
????<instrumentation
????android:name="android.test.InstrumentationTestRunner"
????android:label="Test for My App"
????android:targetPackage="com.example.android_sms" >
????</instrumentation>
????<!-- ??application????user-library??? -->
????<uses-library android:name="android.test.runner" />
???????Android Junit?????????Java??Junit??????????????????????—>Run As—>Android Junit Test
???????????????Android Junit????????
??????
???·???
??????????????????
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