나는 그것에 관해 몇 가지 질문을 보았다.에스프레소 2 - 여러 활동을 테스트하는 방법?
예 : Android Espresso testing app flow
그러나 위의 anwser 여기 에스프레소 2에서 작동하지 않는 다중 활동 테스트 한 TESTFILE에서 허용되지 않는 경우, 어떻게 여러 활동을 테스트하는 흐름을 만들어 내 조각
@Rule
public ActivityTestRule<SplashActivity> mActivityTestRule = new ActivityTestRule<>(SplashActivity.class);
@Test
public void splashActivityTest() {
onView(withId(R.id.splash_container)).perform(swipeLeft());
onView(withId(R.id.splash_container)).perform(swipeLeft());
// launch the main activity
ViewInteraction appCompatButton = onView(
allOf(withId(R.id.introduction_goto_btn), withText("goToMainActivity"), isDisplayed()));
appCompatButton.perform(click());
// the hierarchy can't find HomeBtn , it still hold the Splash's View, so the code below will fail
onView(withId(R.id.home_btn)).check(ViewAssertions.matches(isDisplayed()));
}
입니까?
발신자 및 수신자 활동의 스크린 샷을 공유 할 수 있습니까? –
클릭을 수행 한 후 홈 _btn이 표시되는지 확인하기 전에 잠자기를 추가하려고 했습니까? – jeprubio
@ 2BAB, 안녕 친구. 그 문제를 해결 했니? 나는 똑같이 직면하고있다. – AQU