Testing views

At the heart of instrumented UI testing lies the Android Testing Support Library. This includes the JUnit APIs, a UI Automator and the Espresso testing framework. There is virtually nothing involved in setting Espresso up on Android Studio, as it is included as a dependency by default if you are working on a project generated by the project setup wizard. If not, you will need to add the following to your build.gradle file:

androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 
 
    exclude group: 'com.android.support', 
           module: 'support-annotations' 
 
}) 
If you have developer animation options, such as window and transition animation scales set on your test device, you will need to disable them for the ...

Get Mastering Android Studio 3 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.