java.lang.Object | |
↳ | android.support.test.rule.UiThreadTestRule |
Known Direct Subclasses
ActivityTestRule<T extends Activity>
|
Known Indirect Subclasses
IntentsTestRule<T extends Activity>
|
This rule allows the test method annotated with UiThreadTest
to execute on the
application's main thread (or UI thread).
Before
and
After
will
also be executed on the UI thread.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Helper for running portions of a test on the UI thread.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.junit.rules.TestRule
|
Helper for running portions of a test on the UI thread.
Note, in most cases it is simpler to annotate the test method withUiThreadTest
, which will run the entire test method including methods annotated with
Before
and
After
on the UI thread.
Use this method if you need to switch in and out of the UI thread to perform your test.runnable | runnable containing test code in the run() method |
---|
Throwable |
---|