1
我試圖測試一個活動,包括來自android-annotations 2.7的註釋,比如@EActivity,@ViewById等。每個測試都會因爲NoClassDefFoundError而失敗。有沒有人有一個工作示例如何將Robotium與Android Annotations結合使用? 這裏是我的測試案例:robotium和android註釋
package de.abc.view;
import android.test.ActivityInstrumentationTestCase2;
import android.widget.Button;
import com.jayway.android.robotium.solo.Solo;
import de.abc.R;
public class WorktimeActivityTest extends ActivityInstrumentationTestCase2<WorktimeActivity_>{
private Solo solo;
public WorktimeActivityTest() {
super(WorktimeActivity_.class);
}
public void setUp() throws Exception{
solo = new Solo(getInstrumentation(), getActivity());
}
public void testSelectWorkday() {
Button button = (Button) solo.getView(R.id.selectWorkday);
solo.clickOnView(button);
}
@Override
public void tearDown() throws Exception{
solo.finishOpenedActivities();
}
}
它調用它找不到? – 2013-02-15 06:48:59
看看:http://stackoverflow.com/questions/14076694/classnotfoundexception-using-androidannotations – 2013-02-15 06:52:35