2
Android 앱을 자동화하기 시작했습니다. 그것에는 "조건 & 조건" 화면이 있습니다. 즉, "거부"을 클릭하면 내 앱이 종료됩니다.Robotium에서 닫힌 앱을 다시 시작하는 방법은 무엇입니까?
동일한 프로세스 내에서 앱을 다시 시작하거나 다시 시작할 수 있습니까?
Android 앱을 자동화하기 시작했습니다. 그것에는 "조건 & 조건" 화면이 있습니다. 즉, "거부"을 클릭하면 내 앱이 종료됩니다.Robotium에서 닫힌 앱을 다시 시작하는 방법은 무엇입니까?
동일한 프로세스 내에서 앱을 다시 시작하거나 다시 시작할 수 있습니까?
이보십시오 :
// assuming this method is in a ActivityInstrumentationTestCase2 class
public void test_yourTest() {
// do your testing
Solo.sleep(1000);
// killing all your Activities manually if it doesn't by itself anyway
Solo.finishOpenedActivities();
// relaunch your app by calling the same Activity as in the constructor
// of your ActivityInstrumentationTestCase2
this.launchActivity(TARGET_PACKAGE_ID, YourStartActivity.class, null);
Solo.sleep(1000);
// do your testing
}
감사합니다. 원하는 경우 http://stackoverflow.com/questions/30096491/lifecycle-testing-with-robotium-killing-and-restarting-activity/30099143#30099143 페이지로 이동하여 답변을 게시하십시오. –