Android 용 Cucumber-JVM을 사용하여 Robotium을 성공적으로 통합했습니다.
이제는 오이 - JVM 용 공식 cucumber-android
모듈과 설치에 대한 정보는 have a look here입니다. Cucumber-JVM에 대한 API 문서 및 예제는 http://cukes.info/platforms.html에서 찾을 수 있습니다.
앱의 테스트 모듈에 Robotium 솔로 jar 파일을 종속성 (범위 : 컴파일)으로 추가하기 만하면됩니다. 내 테스트 클래스의
하나는 다음과 같습니다
public class CucumberSteps extends ActivityInstrumentationTestCase2<YourActivity> {
private Solo solo;
public CucumberSteps() {
super(YourActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Before
public void before() {
solo = new Solo(getInstrumentation(), getActivity());
}
@After
public void after() throws Throwable {
//clean up
solo.finalize();
}
@Override
protected void tearDown() throws Exception {
solo.finishOpenedActivities();
super.tearDown();
}
@Given("^step_given_description$")
public void step_given_description() throws Throwable {
final View testView = solo.getView(R.id.testView);
solo.waitForView(testView);
solo.clickOnView(testView);
// and so on
}
}
나는이 사람이 시작하는 충분한 정보를 바랍니다. 이 질문이 제기되었을 때, 오이 - 안드로이드는 아직 존재하지 않았습니다. 하지만 GUI 테스트는 매우 불안정합니다. 나는 안정적으로 일련의 테스트를 로컬에서 수행 할 수 있었다. Jenkins에서는 대개 일부 테스트가 알려지지 않은 이유로 실패합니다.
당신이 나에게보다 조금 더 많은 정보를 제공 할 수 있습니다 어떤면에서 불안정한가? 그들은 추락합니까? 그들은 많이 실패합니까? 가능한 한 더 많은 정보를 주시면 도와 드리겠습니다. 당신이 이런 식으로가는 경우 참고로 https://github.com/calabash-driver/calabash-driver에서 봐야 할 것입니다 –