Android Unit Test
Espresso Espresso is the newest testing framework for Android, also it is not so fresh anymore, I guess it appears in Lollipop time. According to the official document , it can write concise, beautiful, and reliable Android UI tests. @Test public void greeterSaysHello() { onView ( withId ( R . id . name_field ) ) . perform ( typeText ( "Steve" ) ) ; onView ( withId ( R . id . greet_button ) ) . perform ( click ( ) ) ; onView ( withText ( "Hello Steve!" ) ) . check ( matches ( isDisplayed ( ) ) ) ; } Apparently, it’s concise and beautiful syntax comes from the functional coding styles, whether it is reliable, I can not get the conclusion from the above syntax. I think it is the replacement of the deprecated Instrumentation TestCase , so it should be much advanced than the older one. And according to the Chui-Ki Chen’s presentation , it does automatic synchronization of test action with app UI, which is the big breakthrough ...