# UiAutomatorInstrumentationTestRunner

Artifact: [androidx.test.uiautomator:uiautomator](https://developer.android.com/jetpack/androidx/releases/test-uiautomator) [View Source](https://cs.android.com/search?q=file:androidx/test/uiautomator/UiAutomatorInstrumentationTestRunner.java+class:androidx.test.uiautomator.UiAutomatorInstrumentationTestRunner) Added in [2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0) Deprecated in [2.3.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.3.0)

*** ** * ** ***


```
class UiAutomatorInstrumentationTestRunner : InstrumentationTestRunner
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.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) ||
|   |   | ↳ | [androidx.test.uiautomator.UiAutomatorInstrumentationTestRunner](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorInstrumentationTestRunner) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> as it only handles deprecated `https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorTestCase`s. You should use `https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiDevice#getInstance(android.app.Instrumentation)` from any test class as long as you have access to an `https://developer.android.com/reference/android/app/Instrumentation.html` instance.

Test runner for `https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorTestCase`s. Such tests are executed on the device and have access to an applications context.

## Summary

| ### Public constructors |
|---|
| `[UiAutomatorInstrumentationTestRunner](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorInstrumentationTestRunner#UiAutomatorInstrumentationTestRunner())()` **This function is deprecated.** Deprecated in Java |

| ### Protected functions |
|---|---|
| `https://developer.android.com/reference/android/test/AndroidTestRunner.html!` | `[getAndroidTestRunner](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorInstrumentationTestRunner#getAndroidTestRunner())()` **This function is deprecated.** |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[initializeUiAutomatorTest](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorInstrumentationTestRunner#initializeUiAutomatorTest(androidx.test.uiautomator.UiAutomatorTestCase))(test: https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorTestCase!)` **This function is deprecated.** Deprecated in Java |

### Inherited Constants

From [android.app.Instrumentation](https://developer.android.com/reference/android/app/Instrumentation.html) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/app/Instrumentation.html#REPORT_KEY_IDENTIFIER = "id"`

**This property is deprecated.** Deprecated in Java
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/app/Instrumentation.html#REPORT_KEY_STREAMRESULT = "stream"`

**This property is deprecated.** Deprecated in Java
From [android.test.InstrumentationTestRunner](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_KEY_NAME_CLASS = "class"`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_KEY_NAME_TEST = "test"`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_KEY_NUM_CURRENT = "current"`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_KEY_NUM_TOTAL = "numtests"`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_KEY_STACK = "stack"`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_VALUE_ID = "InstrumentationTestRunner"`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_VALUE_RESULT_ERROR = -1`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_VALUE_RESULT_FAILURE = -2`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_VALUE_RESULT_OK = 0`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#REPORT_VALUE_RESULT_START = 1`

**This property is deprecated.**

### Inherited functions

From [android.app.Instrumentation](https://developer.android.com/reference/android/app/Instrumentation.html) `https://developer.android.com/reference/android/os/TestLooperManager.html!` `[acquireLooperManager](https://developer.android.com/reference/android/app/Instrumentation.html#acquireLooperManager(android.os.Looper))(looper: https://developer.android.com/reference/android/os/Looper.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[addMonitor](https://developer.android.com/reference/android/app/Instrumentation.html#addMonitor(android.app.Instrumentation.ActivityMonitor))(monitor: https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html!)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html!` `[addMonitor](https://developer.android.com/reference/android/app/Instrumentation.html#addMonitor(android.content.IntentFilter, android.app.Instrumentation.ActivityResult, boolean))(
filter: https://developer.android.com/reference/android/content/IntentFilter.html!,
result: https://developer.android.com/reference/android/app/Instrumentation.ActivityResult.html!,
block: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html
)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[addResults](https://developer.android.com/reference/android/app/Instrumentation.html#addResults(android.os.Bundle))(results: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnCreate](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnCreate(android.app.Activity, android.os.Bundle))(activity: https://developer.android.com/reference/android/app/Activity.html!, icicle: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnDestroy](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnDestroy(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnNewIntent](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnNewIntent(android.app.Activity, android.content.Intent))(activity: https://developer.android.com/reference/android/app/Activity.html!, intent: https://developer.android.com/reference/android/content/Intent.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnPause](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPause(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnPictureInPictureRequested](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPictureInPictureRequested(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnPostCreate](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPostCreate(android.app.Activity, android.os.Bundle))(activity: https://developer.android.com/reference/android/app/Activity.html!, savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnRestart](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnRestart(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnRestoreInstanceState](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnRestoreInstanceState(android.app.Activity, android.os.Bundle))(
activity: https://developer.android.com/reference/android/app/Activity.html!,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!
)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnResume](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnResume(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnSaveInstanceState](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnSaveInstanceState(android.app.Activity, android.os.Bundle))(activity: https://developer.android.com/reference/android/app/Activity.html!, outState: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnStart](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnStart(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnStop](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnStop(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callActivityOnUserLeaving](https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnUserLeaving(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[callApplicationOnCreate](https://developer.android.com/reference/android/app/Instrumentation.html#callApplicationOnCreate(android.app.Application))(app: https://developer.android.com/reference/android/app/Application.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[checkMonitorHit](https://developer.android.com/reference/android/app/Instrumentation.html#checkMonitorHit(android.app.Instrumentation.ActivityMonitor, int))(monitor: https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html!, minHits: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[endPerformanceSnapshot](https://developer.android.com/reference/android/app/Instrumentation.html#endPerformanceSnapshot())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[finish](https://developer.android.com/reference/android/app/Instrumentation.html#finish(int, android.os.Bundle))(resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, results: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/os/Bundle.html!` `[getAllocCounts](https://developer.android.com/reference/android/app/Instrumentation.html#getAllocCounts())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/os/Bundle.html!` `[getBinderCounts](https://developer.android.com/reference/android/app/Instrumentation.html#getBinderCounts())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/ComponentName.html!` `[getComponentName](https://developer.android.com/reference/android/app/Instrumentation.html#getComponentName())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html!` `[getContext](https://developer.android.com/reference/android/app/Instrumentation.html#getContext())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `[getProcessName](https://developer.android.com/reference/android/app/Instrumentation.html#getProcessName())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html!` `[getTargetContext](https://developer.android.com/reference/android/app/Instrumentation.html#getTargetContext())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/app/UiAutomation.html!` `[getUiAutomation](https://developer.android.com/reference/android/app/Instrumentation.html#getUiAutomation())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[invokeContextMenuAction](https://developer.android.com/reference/android/app/Instrumentation.html#invokeContextMenuAction(android.app.Activity, int, int))(targetActivity: https://developer.android.com/reference/android/app/Activity.html!, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, flag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[invokeMenuActionSync](https://developer.android.com/reference/android/app/Instrumentation.html#invokeMenuActionSync(android.app.Activity, int, int))(targetActivity: https://developer.android.com/reference/android/app/Activity.html!, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, flag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isProfiling](https://developer.android.com/reference/android/app/Instrumentation.html#isProfiling())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/app/Activity.html!` `[newActivity](https://developer.android.com/reference/android/app/Instrumentation.html#newActivity(java.lang.Class&lt;?&gt;, android.content.Context, android.os.IBinder, android.app.Application, android.content.Intent, android.content.pm.ActivityInfo, java.lang.CharSequence, android.app.Activity, java.lang.String, java.lang.Object))(
clazz: https://developer.android.com/reference/java/lang/Class.html<*>!,
context: https://developer.android.com/reference/android/content/Context.html!,
token: https://developer.android.com/reference/android/os/IBinder.html!,
application: https://developer.android.com/reference/android/app/Application.html!,
intent: https://developer.android.com/reference/android/content/Intent.html!,
info: https://developer.android.com/reference/android/content/pm/ActivityInfo.html!,
title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html!,
parent: https://developer.android.com/reference/android/app/Activity.html!,
id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!,
lastNonConfigurationInstance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!
)`

**This function is deprecated.** Deprecated in Java
`java-static https://developer.android.com/reference/android/app/Application.html!` `[newApplication](https://developer.android.com/reference/android/app/Instrumentation.html#newApplication(java.lang.Class&lt;?&gt;, android.content.Context))(clazz: https://developer.android.com/reference/java/lang/Class.html<*>!, context: https://developer.android.com/reference/android/content/Context.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onDestroy](https://developer.android.com/reference/android/app/Instrumentation.html#onDestroy())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[onException](https://developer.android.com/reference/android/app/Instrumentation.html#onException(java.lang.Object, java.lang.Throwable))(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!, e: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[removeMonitor](https://developer.android.com/reference/android/app/Instrumentation.html#removeMonitor(android.app.Instrumentation.ActivityMonitor))(monitor: https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[resetInTouchMode](https://developer.android.com/reference/android/app/Instrumentation.html#resetInTouchMode())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[runOnMainSync](https://developer.android.com/reference/android/app/Instrumentation.html#runOnMainSync(java.lang.Runnable))(runner: https://developer.android.com/reference/java/lang/Runnable.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[sendCharacterSync](https://developer.android.com/reference/android/app/Instrumentation.html#sendCharacterSync(int))(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[sendKeyDownUpSync](https://developer.android.com/reference/android/app/Instrumentation.html#sendKeyDownUpSync(int))(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[sendKeySync](https://developer.android.com/reference/android/app/Instrumentation.html#sendKeySync(android.view.KeyEvent))(event: https://developer.android.com/reference/android/view/KeyEvent.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[sendPointerSync](https://developer.android.com/reference/android/app/Instrumentation.html#sendPointerSync(android.view.MotionEvent))(event: https://developer.android.com/reference/android/view/MotionEvent.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[sendStatus](https://developer.android.com/reference/android/app/Instrumentation.html#sendStatus(int, android.os.Bundle))(resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, results: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[sendStringSync](https://developer.android.com/reference/android/app/Instrumentation.html#sendStringSync(java.lang.String))(text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[sendTrackballEventSync](https://developer.android.com/reference/android/app/Instrumentation.html#sendTrackballEventSync(android.view.MotionEvent))(event: https://developer.android.com/reference/android/view/MotionEvent.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setAutomaticPerformanceSnapshots](https://developer.android.com/reference/android/app/Instrumentation.html#setAutomaticPerformanceSnapshots())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setInTouchMode](https://developer.android.com/reference/android/app/Instrumentation.html#setInTouchMode(boolean))(inTouch: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[start](https://developer.android.com/reference/android/app/Instrumentation.html#start())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/app/Activity.html!` `[startActivitySync](https://developer.android.com/reference/android/app/Instrumentation.html#startActivitySync(android.content.Intent))(intent: https://developer.android.com/reference/android/content/Intent.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startAllocCounting](https://developer.android.com/reference/android/app/Instrumentation.html#startAllocCounting())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startPerformanceSnapshot](https://developer.android.com/reference/android/app/Instrumentation.html#startPerformanceSnapshot())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startProfiling](https://developer.android.com/reference/android/app/Instrumentation.html#startProfiling())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[stopAllocCounting](https://developer.android.com/reference/android/app/Instrumentation.html#stopAllocCounting())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[stopProfiling](https://developer.android.com/reference/android/app/Instrumentation.html#stopProfiling())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[waitForIdle](https://developer.android.com/reference/android/app/Instrumentation.html#waitForIdle(java.lang.Runnable))(recipient: https://developer.android.com/reference/java/lang/Runnable.html!)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[waitForIdleSync](https://developer.android.com/reference/android/app/Instrumentation.html#waitForIdleSync())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/app/Activity.html!` `[waitForMonitor](https://developer.android.com/reference/android/app/Instrumentation.html#waitForMonitor(android.app.Instrumentation.ActivityMonitor))(monitor: https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html!)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/app/Activity.html!` `[waitForMonitorWithTimeout](https://developer.android.com/reference/android/app/Instrumentation.html#waitForMonitorWithTimeout(android.app.Instrumentation.ActivityMonitor, long))(
monitor: https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html!,
timeOut: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html
)`

**This function is deprecated.** Deprecated in Java
From [android.test.InstrumentationTestRunner](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[addTestListener](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#addTestListener(junit.framework.TestListener))(listener: junit.framework.TestListener!)`

**This function is deprecated.**
`junit.framework.TestSuite!` `[getAllTests](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#getAllTests())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/os/Bundle.html!` `[getArguments](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#getArguments())()`

**This function is deprecated.**
`https://developer.android.com/reference/java/lang/ClassLoader.html!` `[getLoader](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#getLoader())()`

**This function is deprecated.**
`junit.framework.TestSuite!` `[getTestSuite](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#getTestSuite())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onCreate](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#onCreate(android.os.Bundle))(arguments: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onStart](https://developer.android.com/reference/android/test/InstrumentationTestRunner.html#onStart())()`

**This function is deprecated.**

## Public constructors

### UiAutomatorInstrumentationTestRunner

Added in 2.2.0 Deprecated in 2.3.0

```
[UiAutomatorInstrumentationTestRunner](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorInstrumentationTestRunner#UiAutomatorInstrumentationTestRunner())()
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

## Protected functions

### getAndroidTestRunner

Added in [2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0) Deprecated in [2.3.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.3.0)

```
protected fun [getAndroidTestRunner](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorInstrumentationTestRunner#getAndroidTestRunner())(): AndroidTestRunner!
```

> [!CAUTION]
> **This function is deprecated.**   

### initializeUiAutomatorTest

Added in [2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0) Deprecated in [2.3.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.3.0)

```
protected fun [initializeUiAutomatorTest](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorInstrumentationTestRunner#initializeUiAutomatorTest(androidx.test.uiautomator.UiAutomatorTestCase))(test: UiAutomatorTestCase!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

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: https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiAutomatorTestCase!` | UiAutomatorTestCase to initialize. |