From 697f742ff059249e17a78e207ff091b39aec953b Mon Sep 17 00:00:00 2001 From: June Leo <22164576+JuneLeo@users.noreply.github.com> Date: Mon, 9 Apr 2018 13:38:13 +0800 Subject: [PATCH] =?UTF-8?q?testSayHello=E6=96=B9=E6=B3=95=E5=A4=B4?= =?UTF-8?q?=E9=83=A8=E7=BC=BA=E5=B0=91@Test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit testSayHello方法头部缺少@Test --- .../java/com/example/testing/testingexample/EspressoTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 +}