# UiAutomatorInstrumentationTestRunner

Summary:[Inherited Constants](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#inhconstants)\|[Ctors](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#pubctors)\|[Methods](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#)  

# UiAutomatorInstrumentationTestRunner

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
UiAutomatorInstrumentationTestRunner
`  
`


``


``

extends `[InstrumentationTestRunner](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html)`


``


`

|---|---|---|-----------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [android.app.Instrumentation](https://developer.android.com/reference/android/app/Instrumentation.html) |||
|   | ↳ | [android.test.InstrumentationTestRunner](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html) ||
|   |   | ↳ | android.support.test.uiautomator.UiAutomatorInstrumentationTestRunner |

<br />

*** ** * ** ***

Test runner for[UiAutomatorTestCase](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorTestCase)s. Such tests are executed on the device and have access to an applications context.

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#)From class` android.test.InstrumentationTestRunner ` |-------------------------------------------------------------------------|--------------------------------------| | [String](https://developer.android.com/reference/java/lang/String.html) | `REPORT_KEY_NAME_CLASS` <br />       | | [String](https://developer.android.com/reference/java/lang/String.html) | `REPORT_KEY_NAME_TEST` <br />        | | [String](https://developer.android.com/reference/java/lang/String.html) | `REPORT_KEY_NUM_CURRENT` <br />      | | [String](https://developer.android.com/reference/java/lang/String.html) | `REPORT_KEY_NUM_TOTAL` <br />        | | [String](https://developer.android.com/reference/java/lang/String.html) | `REPORT_KEY_STACK` <br />            | | [String](https://developer.android.com/reference/java/lang/String.html) | `REPORT_VALUE_ID` <br />             | | `int`                                                                   | `REPORT_VALUE_RESULT_ERROR` <br />   | | `int`                                                                   | `REPORT_VALUE_RESULT_FAILURE` <br /> | | `int`                                                                   | `REPORT_VALUE_RESULT_OK` <br />      | | `int`                                                                   | `REPORT_VALUE_RESULT_START` <br />   | |
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#)From class` android.app.Instrumentation ` |-------------------------------------------------------------------------|----------------------------------| | [String](https://developer.android.com/reference/java/lang/String.html) | `REPORT_KEY_IDENTIFIER` <br />   | | [String](https://developer.android.com/reference/java/lang/String.html) | `REPORT_KEY_STREAMRESULT` <br /> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

|                                                                                         ### Public constructors                                                                                         ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[UiAutomatorInstrumentationTestRunner](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#UiAutomatorInstrumentationTestRunner())`() ` |

|                                                                 ### Public methods                                                                  ||
|---------|--------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onStart](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#onStart())`() ` |

|                                                                                                                                                                                                                                                 ### Protected methods                                                                                                                                                                                                                                                  ||
|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[AndroidTestRunner](https://developer.android.com/reference/android/test/AndroidTestRunner.html) | ` `[getAndroidTestRunner](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#getAndroidTestRunner())`() `                                                                                                                                                                                                                                              |
| ` void`                                                                                             | ` `[initializeUiAutomatorTest](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#initializeUiAutomatorTest(android.support.test.uiautomator.UiAutomatorTestCase))`(`[UiAutomatorTestCase](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorTestCase)` test) ` Perform initialization specific to UiAutomator test. |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#)From class` `[android.test.InstrumentationTestRunner](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html)` ` |-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| | ` `[TestSuite](https://developer.android.com/reference/junit/framework/TestSuite.html)              | ` getAllTests() `                                                                             | | ` `[AndroidTestRunner](https://developer.android.com/reference/android/test/AndroidTestRunner.html) | ` getAndroidTestRunner() `                                                                    | | ` `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                         | ` getArguments() `                                                                            | | ` `[ClassLoader](https://developer.android.com/reference/java/lang/ClassLoader.html)                | ` getLoader() `                                                                               | | ` `[TestSuite](https://developer.android.com/reference/junit/framework/TestSuite.html)              | ` getTestSuite() `                                                                            | | ` void`                                                                                             | ` onCreate(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) ` | | ` void`                                                                                             | ` onStart() `                                                                                 | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#)From class` `[android.app.Instrumentation](https://developer.android.com/reference/android/app/Instrumentation.html)` ` |--------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` TestLooperManager`                                                                                                           | ` acquireLooperManager(`[Looper](https://developer.android.com/reference/android/os/Looper.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | ` `[Instrumentation.ActivityMonitor](https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html) | ` addMonitor(`[String](https://developer.android.com/reference/java/lang/String.html)` arg0, `[Instrumentation.ActivityResult](https://developer.android.com/reference/android/app/Instrumentation.ActivityResult.html)` arg1, boolean arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` `[Instrumentation.ActivityMonitor](https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html) | ` addMonitor(`[IntentFilter](https://developer.android.com/reference/android/content/IntentFilter.html)` arg0, `[Instrumentation.ActivityResult](https://developer.android.com/reference/android/app/Instrumentation.ActivityResult.html)` arg1, boolean arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                                                        | ` addMonitor(`[Instrumentation.ActivityMonitor](https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                                                        | ` addResults(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                        | ` callActivityOnCreate(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                        | ` callActivityOnCreate(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1, `[PersistableBundle](https://developer.android.com/reference/android/os/PersistableBundle.html)` arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                                                        | ` callActivityOnDestroy(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                        | ` callActivityOnNewIntent(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                                                        | ` callActivityOnPause(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                                                        | ` callActivityOnPostCreate(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1, `[PersistableBundle](https://developer.android.com/reference/android/os/PersistableBundle.html)` arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                        | ` callActivityOnPostCreate(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                        | ` callActivityOnRestart(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                        | ` callActivityOnRestoreInstanceState(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                                                        | ` callActivityOnRestoreInstanceState(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1, `[PersistableBundle](https://developer.android.com/reference/android/os/PersistableBundle.html)` arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                                                        | ` callActivityOnResume(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                        | ` callActivityOnSaveInstanceState(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1, `[PersistableBundle](https://developer.android.com/reference/android/os/PersistableBundle.html)` arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                                                        | ` callActivityOnSaveInstanceState(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                        | ` callActivityOnStart(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                                                        | ` callActivityOnStop(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                                                        | ` callActivityOnUserLeaving(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                        | ` callApplicationOnCreate(`[Application](https://developer.android.com/reference/android/app/Application.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` boolean`                                                                                                                     | ` checkMonitorHit(`[Instrumentation.ActivityMonitor](https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html)` arg0, int arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                                                        | ` endPerformanceSnapshot() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                                                        | ` finish(int arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                                    | ` getAllocCounts() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                                    | ` getBinderCounts() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` `[ComponentName](https://developer.android.com/reference/android/content/ComponentName.html)                                 | ` getComponentName() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` `[Context](https://developer.android.com/reference/android/content/Context.html)                                             | ` getContext() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` `[String](https://developer.android.com/reference/java/lang/String.html)                                                     | ` getProcessName() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` `[Context](https://developer.android.com/reference/android/content/Context.html)                                             | ` getTargetContext() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` `[UiAutomation](https://developer.android.com/reference/android/app/UiAutomation.html)                                       | ` getUiAutomation(int arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` `[UiAutomation](https://developer.android.com/reference/android/app/UiAutomation.html)                                       | ` getUiAutomation() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` boolean`                                                                                                                     | ` invokeContextMenuAction(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, int arg1, int arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` boolean`                                                                                                                     | ` invokeMenuActionSync(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, int arg1, int arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` boolean`                                                                                                                     | ` isProfiling() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | ` `[Activity](https://developer.android.com/reference/android/app/Activity.html)                                               | ` newActivity(`[Class](https://developer.android.com/reference/java/lang/Class.html)`<?> arg0, `[Context](https://developer.android.com/reference/android/content/Context.html)` arg1, `[IBinder](https://developer.android.com/reference/android/os/IBinder.html)` arg2, `[Application](https://developer.android.com/reference/android/app/Application.html)` arg3, `[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg4, `[ActivityInfo](https://developer.android.com/reference/android/content/pm/ActivityInfo.html)` arg5, `[CharSequence](https://developer.android.com/reference/java/lang/CharSequence.html)` arg6, `[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg7, `[String](https://developer.android.com/reference/java/lang/String.html)` arg8, `[Object](https://developer.android.com/reference/java/lang/Object.html)` arg9) ` | | ` `[Activity](https://developer.android.com/reference/android/app/Activity.html)                                               | ` newActivity(`[ClassLoader](https://developer.android.com/reference/java/lang/ClassLoader.html)` arg0, `[String](https://developer.android.com/reference/java/lang/String.html)` arg1, `[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` `[Application](https://developer.android.com/reference/android/app/Application.html)                                         | ` newApplication(`[ClassLoader](https://developer.android.com/reference/java/lang/ClassLoader.html)` arg0, `[String](https://developer.android.com/reference/java/lang/String.html)` arg1, `[Context](https://developer.android.com/reference/android/content/Context.html)` arg2) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` static `[Application](https://developer.android.com/reference/android/app/Application.html)                                  | ` newApplication(`[Class](https://developer.android.com/reference/java/lang/Class.html)`<?> arg0, `[Context](https://developer.android.com/reference/android/content/Context.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | ` void`                                                                                                                        | ` onCreate(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                                                        | ` onDestroy() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                                                     | ` onException(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0, `[Throwable](https://developer.android.com/reference/java/lang/Throwable.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` void`                                                                                                                        | ` onStart() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                                                        | ` removeMonitor(`[Instrumentation.ActivityMonitor](https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` void`                                                                                                                        | ` runOnMainSync(`[Runnable](https://developer.android.com/reference/java/lang/Runnable.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` void`                                                                                                                        | ` sendCharacterSync(int arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                        | ` sendKeyDownUpSync(int arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                        | ` sendKeySync(`[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                                                        | ` sendPointerSync(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                                                        | ` sendStatus(int arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | ` void`                                                                                                                        | ` sendStringSync(`[String](https://developer.android.com/reference/java/lang/String.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                                                        | ` sendTrackballEventSync(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                                                        | ` setAutomaticPerformanceSnapshots() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                                                        | ` setInTouchMode(boolean arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                                                        | ` start() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | ` `[Activity](https://developer.android.com/reference/android/app/Activity.html)                                               | ` startActivitySync(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` `[Activity](https://developer.android.com/reference/android/app/Activity.html)                                               | ` startActivitySync(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | ` void`                                                                                                                        | ` startAllocCounting() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                                                        | ` startPerformanceSnapshot() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                        | ` startProfiling() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                                                        | ` stopAllocCounting() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                                                        | ` stopProfiling() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                        | ` waitForIdle(`[Runnable](https://developer.android.com/reference/java/lang/Runnable.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                        | ` waitForIdleSync() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` `[Activity](https://developer.android.com/reference/android/app/Activity.html)                                               | ` waitForMonitor(`[Instrumentation.ActivityMonitor](https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html)` arg0) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` `[Activity](https://developer.android.com/reference/android/app/Activity.html)                                               | ` waitForMonitorWithTimeout(`[Instrumentation.ActivityMonitor](https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html)` arg0, long arg1) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner#)From interface` `[android.test.TestSuiteProvider](https://developer.android.com/reference/android/test/TestSuiteProvider.html)` ` |-------------------------------------------------------------------------------------------------|--------------------| | ` abstract `[TestSuite](https://developer.android.com/reference/junit/framework/TestSuite.html) | ` getTestSuite() ` | ||

## Public constructors

### UiAutomatorInstrumentationTestRunner

```
UiAutomatorInstrumentationTestRunner ()
```

<br />

<br />

## Public methods

### onStart

```
void onStart ()
```

<br />

<br />

## Protected methods

### getAndroidTestRunner

```
AndroidTestRunner getAndroidTestRunner ()
```

<br />

<br />

|                                                 Returns                                                  ||
|--------------------------------------------------------------------------------------------------|--------|
| [AndroidTestRunner](https://developer.android.com/reference/android/test/AndroidTestRunner.html) | <br /> |

### initializeUiAutomatorTest

```
void initializeUiAutomatorTest (UiAutomatorTestCase test)
```

Perform initialization specific to UiAutomator test. It sets up the test case so that it can access the UiDevice and gives it access to the command line arguments.

<br />

|                                Parameters                                ||
|--------|------------------------------------------------------------------|
| `test` | `UiAutomatorTestCase`: UiAutomatorTestCase to initialize. <br /> |

-

  ## Interfaces

  - [IAutomationSupport](https://developer.android.com/reference/android/support/test/uiautomator/IAutomationSupport)
  - [UiWatcher](https://developer.android.com/reference/android/support/test/uiautomator/UiWatcher)
-

  ## Classes

  - [By](https://developer.android.com/reference/android/support/test/uiautomator/By)
  - [BySelector](https://developer.android.com/reference/android/support/test/uiautomator/BySelector)
  - [Configurator](https://developer.android.com/reference/android/support/test/uiautomator/Configurator)
  - [EventCondition](https://developer.android.com/reference/android/support/test/uiautomator/EventCondition)
  - [SearchCondition](https://developer.android.com/reference/android/support/test/uiautomator/SearchCondition)
  - [UiAutomatorInstrumentationTestRunner](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner)
  - [UiAutomatorTestCase](https://developer.android.com/reference/android/support/test/uiautomator/UiAutomatorTestCase)
  - [UiCollection](https://developer.android.com/reference/android/support/test/uiautomator/UiCollection)
  - [UiDevice](https://developer.android.com/reference/android/support/test/uiautomator/UiDevice)
  - [UiObject](https://developer.android.com/reference/android/support/test/uiautomator/UiObject)
  - [UiObject2](https://developer.android.com/reference/android/support/test/uiautomator/UiObject2)
  - [UiObject2Condition](https://developer.android.com/reference/android/support/test/uiautomator/UiObject2Condition)
  - [UiScrollable](https://developer.android.com/reference/android/support/test/uiautomator/UiScrollable)
  - [UiSelector](https://developer.android.com/reference/android/support/test/uiautomator/UiSelector)
  - [Until](https://developer.android.com/reference/android/support/test/uiautomator/Until)
-

  ## Enums

  - [Direction](https://developer.android.com/reference/android/support/test/uiautomator/Direction)
-

  ## Exceptions

  - [StaleObjectException](https://developer.android.com/reference/android/support/test/uiautomator/StaleObjectException)
  - [UiObjectNotFoundException](https://developer.android.com/reference/android/support/test/uiautomator/UiObjectNotFoundException)