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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.