当前位置: 动力学知识库 > 问答 > 编程问答 >

Relaunch apk and continue robotium tests in eclipse

问题描述:

I have a robotium test suit that covers EULA.

First, Test apk has to be launched, and click "REJECT" button in the EULA page

Then, the Test app has to be relaunched and the robotium test suit has to continue.

But, when I click "REJECT" on the eula page, the test finises with an error "Test run failed: Instrumentation run failed due to 'Process crashed."

Code:

 currentActivity=solo.getCurrentActivity();

packageManager = currentActivity.getPackageManager();

Thread.sleep(1000);

solo.clickOnButton(1); // Reject Button

currentActivity.startActivity(packageManager.getLaunchIntentForPackage("myappPackageName"));

Error:

"Test run failed: Instrumentation run failed due to 'Process crashed."

How do i go about achieviving this..

分享给朋友:
您可能感兴趣的文章:
随机阅读: