UiThreadTest

public abstract @interface UiThreadTest
implements Annotation

android.support.test.annotation.UiThreadTest


This annotation should be used along with UiThreadTestRule or with any rule that inherits from it. When the annotation is present, the test method is executed on the application's UI thread (or main thread).

Note, due to current JUnit limitation, methods annotated with Before and After will also be executed on the UI Thread. Consider using runOnUiThread(Runnable) if this is an issue.

See also:

Summary

Inherited methods

From interface java.lang.annotation.Annotation