Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited Methods](https://developer.android.com/reference/android/test/UiThreadTest#inhmethods)

# UiThreadTest

*** ** * ** ***

` public abstract @interface UiThreadTest `   
` implements https://developer.android.com/reference/java/lang/annotation/Annotation `

|---|
| android.test.UiThreadTest |

<br />

*** ** * ** ***

<br />

**This @interface was deprecated in API level 24.**   

Use [UiThreadTest](https://developer.android.com/reference/android/support/test/annotation/UiThreadTest) instead. New tests should be written using the [Android Testing Support Library](https://developer.android.com/tools/testing-support-library).

This annotation can be used on an `https://developer.android.com/reference/android/test/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

### Inherited methods

From interface ` https://developer.android.com/reference/java/lang/annotation/Annotation ` ` abstract https://developer.android.com/reference/java/lang/Class<? extends https://developer.android.com/reference/java/lang/annotation/Annotation>` ` https://developer.android.com/reference/java/lang/annotation/Annotation#annotationType()() `

Returns the annotation interface of this annotation.
` abstract boolean` ` https://developer.android.com/reference/java/lang/annotation/Annotation#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Returns true if the specified object represents an annotation that is logically equivalent to this one.
` abstract int` ` https://developer.android.com/reference/java/lang/annotation/Annotation#hashCode()() `

Returns the hash code of this annotation.
` abstract https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/annotation/Annotation#toString()() `

Returns a string representation of this annotation.