Summary: Inherited Constants | Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]

# UiAutomatorInstrumentationTestRunner

`public class UiAutomatorInstrumentationTestRunner`
`` `` `extends InstrumentationTestRunner` ``

java.lang.Object
↳ | android.app.Instrumentation
| ↳ | android.test.InstrumentationTestRunner
|  | ↳ | android.support.test.uiautomator.UiAutomatorInstrumentationTestRunner

Test runner for `UiAutomatorTestCase`s. Such tests are executed on the device and have access to an applications context.

## Summary

### Inherited constants
From class `android.test.InstrumentationTestRunner`
`String` | `REPORT_KEY_NAME_CLASS`
`String` | `REPORT_KEY_NAME_TEST`
`String` | `REPORT_KEY_NUM_CURRENT`
`String` | `REPORT_KEY_NUM_TOTAL`
`String` | `REPORT_KEY_STACK`
`String` | `REPORT_VALUE_ID`
`int` | `REPORT_VALUE_RESULT_ERROR`
`int` | `REPORT_VALUE_RESULT_FAILURE`
`int` | `REPORT_VALUE_RESULT_OK`
`int` | `REPORT_VALUE_RESULT_START`
From class `android.app.Instrumentation`
`String` | `REPORT_KEY_IDENTIFIER`
`String` | `REPORT_KEY_STREAMRESULT`

### Public constructors
`UiAutomatorInstrumentationTestRunner()`

### Public methods
`void` | `onStart()`

### Protected methods
`AndroidTestRunner` | `getAndroidTestRunner()`
`void` | `initializeUiAutomatorTest(UiAutomatorTestCase test)` Perform initialization specific to UiAutomator test.

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

## Public constructors

### UiAutomatorInstrumentationTestRunner

    UiAutomatorInstrumentationTestRunner ()

## Public methods

### onStart

    void onStart ()

## Protected methods

### getAndroidTestRunner

    AndroidTestRunner getAndroidTestRunner ()

Returns
`AndroidTestRunner` |

### 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.

Parameters
`test` | `UiAutomatorTestCase`: UiAutomatorTestCase to initialize.

- ## Interfaces

  - IAutomationSupport
  - UiWatcher

- ## Classes

  - By
  - BySelector
  - Configurator
  - EventCondition
  - SearchCondition
  - UiAutomatorInstrumentationTestRunner
  - UiAutomatorTestCase
  - UiCollection
  - UiDevice
  - UiObject
  - UiObject2
  - UiObject2Condition
  - UiScrollable
  - UiSelector
  - Until

- ## Enums

  - Direction

- ## Exceptions

  - StaleObjectException
  - UiObjectNotFoundException