Sign in Go Pro

Android Testing Support Library 1.0

Using the Grant Permission Rule in Espresso

 

Previous

About

The GrantPermissionRule Rule lets you grant runtime permissions on Android M and above. You would use this Rule when a test requires a runtime permission to do its work. In this lesson, see how you can take advantage of this Rule to avoid the permission dialog from showing up and blocking your application's User Interface.

Lessons in Android Testing Support Library 1.0