Added in API level 1
Deprecated in API level 24

UiThreadTest


@Target([AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER]) class UiThreadTest
android.test.UiThreadTest

This annotation can be used on an InstrumentationTestCase's test methods. When the annotation is present, the test method is executed on the application's main thread (or UI thread.) Note that instrumentation methods may not be used when this annotation is present.

Summary

Public constructors

This annotation can be used on an InstrumentationTestCase's test methods.

Public constructors

UiThreadTest

Added in API level 1
Deprecated in API level 24
UiThreadTest()

Deprecated: Use UiThreadTest instead. New tests should be written using the Android Testing Support Library.

This annotation can be used on an InstrumentationTestCase's test methods. When the annotation is present, the test method is executed on the application's main thread (or UI thread.) Note that instrumentation methods may not be used when this annotation is present.