Android???????????????1
???????????? ???????[ 2013/12/19 10:26:17 ] ????????
??????WkjTest?????У????MainActivityTest????????????Run As....????Android JUnit Test?????????????????????豸?????г??????Junit???????????????test001??????????????ò????????????????????????????????????
???????????????????????????????testTemp001????????????????????????????????????????????????????????????????????????????????????????????????е??????????????
???????濪???д????????????????????????????
??????????????????????MVC????????????????????????????MVC??????????Activity???????View??View???Model???????????????????testTemp001?????????????????????
??????Android??????????????Model??????Model????к??????????????????????Application????????Model????????AppModel?????Application??????????????Model???ò???Singleton???????????????????????????????Activity?л???????????????????????У????Model?д???welcom_msg??????????MainActivity?в?????????Model??????????????????С?
????AppModel???????????
package com.bjcic.wkj;
import android.app.Application;
public class AppModel extends Application {
// ??????????????
public void onCreate() {
super.onCreate();
welcomeMsg = getString(R.string.welcome_msg);
}
public void onTerminate() {
super.onTerminate();
}
// ???????????????
private String welcomeMsg = null;
public String getWelcomeMsg() {
return welcomeMsg;
}
public void setWelcomeMsg(String welcomeMsg) {
this.welcomeMsg = welcomeMsg;
}
}
??MainActivity????????′???
[java] view plaincopy
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
appModel = (AppModel)getApplication();
}
@Override
public void onResume() {
super.onResume();
((TextView)findViewById(R.id.j_titleTxtv)).setText(appModel.getWelcomeMsg());
}
private AppModel appModel = null;
|
????????Manifest?????????
<application
android:allowBackup="true"
android:name=".AppModel"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
|
???????????WkjTest????????MainActivityTest????????Run As .... =>Android JUnit Test?????Junit??????????????????????????????????????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????????????????TDD??????????????????Python???????????????????????????????Ч????????????????????????????????????????????Щ?????????????????????????TDD????????????ú???δ????????????? Test-driven development???????????????????????????????????????TDD(3)????????????TDD(2)????????????TDD(1)Android???????????????3Android???????????????2Android????????????????????????????????
???·???
??????????????????
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????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????