diff --git a/unitTestStudy/src/androidTest/java/com/example/testing/testingexample/EspressoTest.java b/unitTestStudy/src/androidTest/java/com/example/testing/testingexample/EspressoTest.java index 6734236..5a1180b 100644 --- a/unitTestStudy/src/androidTest/java/com/example/testing/testingexample/EspressoTest.java +++ b/unitTestStudy/src/androidTest/java/com/example/testing/testingexample/EspressoTest.java @@ -37,6 +37,7 @@ public EspressoTest() { * 这样写会多写代码,并且会出错. * 比如此例,输入太慢了,程序就执行了. */ + @Test public void testSayHello() { onView(withId(R.id.editText)).perform(typeText(STRING_TO_BE_TYPED), closeSoftKeyboard()); //line 1 @@ -46,4 +47,4 @@ public void testSayHello() { String expectedText = "Hello, " + STRING_TO_BE_TYPED + "!"; onView(withId(R.id.textView)).check(matches(withText(expectedText))); //line 3 } -} \ No newline at end of file +}