Android Robotium?????????????
???????????? ???????[ 2014/8/19 11:49:58 ] ????????Android ???
???????????????????????Щandroid???????????????Щ???????????????
???????????? java -jar re-sign.jar ???????android·????????ú??
??????????????£?
????????ANDROID_HOME?android sdk???????????磺D:android-sdk
??????path?????????????
????%ANDROID_HOME% ools;%ANDROID_HOME%platform-tools;
????????????????????
??????????а??APK??????????????????apk??
???????robotium???????ú????????????μ?key??????????????????????apk?????re-sign.jar??????debug key??apk??????????????apk??????????????????
????re-sign.jar????????????????
????http://www.troido.de/re-sign.jar
????????????????????? ??? java -jar re-sign.jar????????????????apk???????????????????????debug key??apk
??????????apk??????л?????????????y????????????????????????????????????????
???????????????????????????????????????????????????
????adb install mitalk_debug.apk(??????apk??????)
????????????????????????????????????
???????
???????????? APK ????????
????1?????apk ???
????2??????????????????е? META-INF ????META-INF ?????????CERT ??MANIFEST ?????????????????
??????????????
????3?????????к????°??????????????????????zip ?????????????????????apk
????????? APK ???????????
????1??????鸴?????????????????apk ????????????
????2??jarsigner -keystore debug.keystore -storepass android -keypass android D:Robotium
obotium
obotiumweixin_delet_rsa_sf.apk androiddebugkey
????????????????????
??????Eclipse?????File->New???Android Test Project????????????????????This project(?????????????????????)??????????????android?汾?????
???????????′??????????com.tencent.test????e??′???LoginTest??????
package com.mitalk.test;
import android.app.Activity;
import android.test.ActivityInstrumentationTestCase2;
import com.jayway.android.robotium.solo.Solo;
@SuppressWarnings("rawtypes")
public class LoginTest extends ActivityInstrumentationTestCase2 {
public Solo solo;
public Activity activity;
private static Class<?> launchActivityClass;
// ???re-sign.jar??????????????????????
private static String mainActiviy = "com.tencent.mm.ui.LauncherUI";
private static String packageName = "com.tencent.mm";
static {
try {
launchActivityClass = Class.forName(mainActiviy);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
@SuppressWarnings("unchecked")
public LoginTest() {
super(packageName?? launchActivityClass);
}
@Override
protected void setUp() throws Exception {
super.setUp();
this.activity = this.getActivity();
// this.solo = new Solo(getInstrumentation()?? getActivity());
}
public void testLoginWithIncorrentUsernameAndPassword() throws Exception {
wait(5000);
//?????
}
@Override
public void tearDown() throws Exception {
try {
this.solo.finishOpenedActivities();
} catch (Throwable e) {
e.printStackTrace();
}
this.activity.finish();
super.tearDown();
}
}
??????
???·???
??????????????????
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