Robotium 테스트 스위트를 사용하고 있는데, 이는 첫 번째 테스트 만 실행 한 다음 그 후에 멈 춥니 다. 프로그램을 몇 분 동안 실행 시키지만 "테스트 실행 중"이라고 표시됩니다. 여기 내 코드 :Robotium이 (가) 모든 테스트를 실행하지 않습니다.
import com.jayway.android.robotium.solo.Solo;
import android.test.ActivityInstrumentationTestCase2;
@SuppressWarnings("unchecked")
public class ODPRobotiumTest extends ActivityInstrumentationTestCase2 {
private static final String TARGET_PACKAGE_ID = "com.gravitymobile.app.hornbill";
private static final String LAUNCHER_ACTIVITY_FULL_CLASSNAME = "com.vzw.odp.LaunchActivity";
private static Class<?>launcherActivityClass;
static{
try{
launcherActivityClass = Class.forName(LAUNCHER_ACTIVITY_FULL_CLASSNAME);
} catch (ClassNotFoundException e){
throw new RuntimeException(e);
}
}
@SuppressWarnings({ "unchecked", "deprecation" })
public ODPRobotiumTest() throws ClassNotFoundException{
super(TARGET_PACKAGE_ID, launcherActivityClass);
}
private Solo solo;
@Override
protected void setUp() throws Exception{
solo = new Solo(getInstrumentation(), getActivity());
}
public void testLine1(){
solo.searchText("Easy to Find");
}
public void testLine2(){
solo.searchText("Hassle-Free");
}
public void testLine3(){
solo.searchText("Trust");
}
public void testLine4(){
solo.searchText("Verizon Curated Wallpaper");
}
public void testLine5(){
solo.searchText("Taco's");
}
@Override
public void tearDown() throws Exception{
try{
solo.finalize();
}catch(Throwable e){
e.printStackTrace();
}
getActivity().finish();
super.tearDown();
}
}
도움이 될 것입니다. 감사! (나는이 문제가 될 것이라고 생각하지 않을지라도)
assertTrue를 사용할 때 내가 추가 한 그림에서 볼 수 있듯이 테스트가 실패합니다. 그 테스트에서 당신이 제안한 것처럼 첫 번째 줄에 어설트 트루를 사용했는데 실패했습니다. 그러나 제가 찾고있는 것은 프로그램에 있습니다. 그것은 나에게 거짓 부정을주고 있습니다. – BlackHatSamurai
@BlaineAnderson 잘 됐네요. 최소한 첫 번째 테스트가 달리고 매달려 있다고 지적 했어요. – Blundell