Skip to content

Most visited

Recently visited

navigation

android.support.test.rule

Classes

ActivityTestRule<T extends Activity> This rule provides functional testing of a single Activity
DisableOnAndroidDebug The DisableOnAndroidDebug Rule allows you to label certain rules to be disabled when debugging. 
GrantPermissionRule The GrantPermissionRule Rule allows granting of runtime permissions on Android M (API 23) and above. 
ServiceTestRule A JUnit rule that provides a simplified mechanism to start and shutdown your service before and after the duration of your test. 
UiThreadTestRule This class is deprecated. use UiThreadTest directly without this rule. UiThreadTest is now supported as part of the core Android test runner to provide the ability to run methods annotated with @Before and @After on the UI thread regardless of what @Test is annotated with.  
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)