8
Androidスタジオでインストゥルメンテーションテストをデバッグすると、テストはどのブレークポイントでも停止しません。ユニットテストのデバッグユーザー名のEditTextが表示されている場合、私は唯一のチェックという単純なインストルメントテストを持っている:Androidスタジオで計測器テストをデバッグする方法は?
build.gradle
で
@RunWith(AndroidJUnit4.class)
public class LogonActivityTest {
@Rule
public ActivityTestRule<LogOnActivity> mActivityRule = new ActivityTestRule<>(LogOnActivity.class, true, false);
@Before
public void setUp() throws Exception {
mActivityRule.launchActivity(new Intent()); // breakpoint here
}
@Test
public void testSimple() throws Exception {
onView(withId(R.id.act_logon_et_username)).check(matches(isDisplayed())); // breakpoint here
}
}
私は
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
どのように私は、インストルメントテストをデバッグすることができますが、適切に設定していますか?私はエスプレッソ、モッキート、ダガーを使用しています。