# BackupRestoreTestRunner

Artifact: [androidx.test.backup:backup](https://developer.android.com/jetpack/androidx/releases/test-backup) [View Source](https://cs.android.com/search?q=file:androidx/test/backup/BackupRestoreTestRunner.kt+class:androidx.test.backup.BackupRestoreTestRunner) Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/test-backup#1.0.0-alpha04)

*** ** * ** ***


```
class BackupRestoreTestRunner : Instrumentation
```

<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) ||
|   | ↳ | [androidx.test.backup.BackupRestoreTestRunner](https://developer.android.com/reference/kotlin/androidx/test/backup/BackupRestoreTestRunner) |

*** ** * ** ***

Executes on-device backup actions dispatched by host orchestrators.

Stays dormant until the host orchestrator asks for an action, runs the requested `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceAction`, and returns its result. Actions can get this instrumentation from `https://developer.android.com/reference/kotlin/androidx/test/platform/app/InstrumentationRegistry`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupRestoreTestRunner#BackupRestoreTestRunner()()` |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupRestoreTestRunner#onCreate(android.os.Bundle)(arguments: https://developer.android.com/reference/android/os/Bundle.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupRestoreTestRunner#onStart()()` |

### Inherited functions

From [android.app.Instrumentation](https://developer.android.com/reference/android/app/Instrumentation.html) `https://developer.android.com/reference/android/os/TestLooperManager.html` `https://developer.android.com/reference/android/app/Instrumentation.html#acquireLooperManager(android.os.Looper)(looper: https://developer.android.com/reference/android/os/Looper.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)` `https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html` `https://developer.android.com/reference/android/app/Instrumentation.html#addMonitor(java.lang.String, android.app.Instrumentation.ActivityResult, boolean)(
cls: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html,
result: https://developer.android.com/reference/android/app/Instrumentation.ActivityResult.html,
block: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html
)` `https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html` `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
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#addResults(android.os.Bundle)(results: https://developer.android.com/reference/android/os/Bundle.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnCreate(android.app.Activity, android.os.Bundle, android.os.PersistableBundle)(
activity: https://developer.android.com/reference/android/app/Activity.html,
icicle: https://developer.android.com/reference/android/os/Bundle.html,
persistentState: https://developer.android.com/reference/android/os/PersistableBundle.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnDestroy(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnNewIntent(android.app.Activity, android.content.Intent, android.app.ComponentCaller)(
activity: https://developer.android.com/reference/android/app/Activity.html,
intent: https://developer.android.com/reference/android/content/Intent.html,
caller: https://developer.android.com/reference/android/app/ComponentCaller.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPause(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPictureInPictureRequested(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPostCreate(android.app.Activity, android.os.Bundle, android.os.PersistableBundle)(
activity: https://developer.android.com/reference/android/app/Activity.html,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?,
persistentState: https://developer.android.com/reference/android/os/PersistableBundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnRestart(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnRestoreInstanceState(android.app.Activity, android.os.Bundle, android.os.PersistableBundle)(
activity: https://developer.android.com/reference/android/app/Activity.html,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?,
persistentState: https://developer.android.com/reference/android/os/PersistableBundle.html?
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnResume(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnSaveInstanceState(android.app.Activity, android.os.Bundle, android.os.PersistableBundle)(
activity: https://developer.android.com/reference/android/app/Activity.html,
outState: https://developer.android.com/reference/android/os/Bundle.html,
outPersistentState: https://developer.android.com/reference/android/os/PersistableBundle.html
)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnStart(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnStop(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnUserLeaving(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#callApplicationOnCreate(android.app.Application)(app: https://developer.android.com/reference/android/app/Application.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `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)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#endPerformanceSnapshot()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)` `https://developer.android.com/reference/android/app/UiAutomation.html` `https://developer.android.com/reference/android/app/Instrumentation.html#getUiAutomation(int)(flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `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)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `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)` `https://developer.android.com/reference/android/app/Activity.html` `https://developer.android.com/reference/android/app/Instrumentation.html#newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent)(cl: https://developer.android.com/reference/java/lang/ClassLoader.html, className: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, intent: https://developer.android.com/reference/android/content/Intent.html)` `https://developer.android.com/reference/android/app/Activity.html` `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
)` `https://developer.android.com/reference/android/app/Application.html` `https://developer.android.com/reference/android/app/Instrumentation.html#newApplication(java.lang.ClassLoader, java.lang.String, android.content.Context)(cl: https://developer.android.com/reference/java/lang/ClassLoader.html, className: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, context: https://developer.android.com/reference/android/content/Context.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#onDestroy()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `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)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#resetInTouchMode()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#runOnMainSync(java.lang.Runnable)(runner: https://developer.android.com/reference/java/lang/Runnable.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#sendCharacterSync(int)(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#sendKeyDownUpSync(int)(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#sendKeySync(android.view.KeyEvent)(event: https://developer.android.com/reference/android/view/KeyEvent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#sendPointerSync(android.view.MotionEvent)(event: https://developer.android.com/reference/android/view/MotionEvent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#sendTrackballEventSync(android.view.MotionEvent)(event: https://developer.android.com/reference/android/view/MotionEvent.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#setAutomaticPerformanceSnapshots()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#setInTouchMode(boolean)(inTouch: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#start()()` `https://developer.android.com/reference/android/app/Activity.html` `https://developer.android.com/reference/android/app/Instrumentation.html#startActivitySync(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` `https://developer.android.com/reference/android/app/Activity.html` `https://developer.android.com/reference/android/app/Instrumentation.html#startActivitySync(android.content.Intent, android.os.Bundle)(intent: https://developer.android.com/reference/android/content/Intent.html, options: https://developer.android.com/reference/android/os/Bundle.html?)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#startAllocCounting()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#startPerformanceSnapshot()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#startProfiling()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#stopAllocCounting()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#stopProfiling()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#waitForIdle(java.lang.Runnable)(recipient: https://developer.android.com/reference/java/lang/Runnable.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#waitForIdleSync()()` `https://developer.android.com/reference/android/app/Activity.html` `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)` `https://developer.android.com/reference/android/app/Activity.html` `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
)`

### Inherited properties

From [android.app.Instrumentation](https://developer.android.com/reference/android/app/Instrumentation.html) `open https://developer.android.com/reference/android/os/Bundle.html` `https://developer.android.com/reference/android/app/Instrumentation.html#allocCounts` `open https://developer.android.com/reference/android/os/Bundle.html` `https://developer.android.com/reference/android/app/Instrumentation.html#binderCounts` `open https://developer.android.com/reference/android/content/ComponentName.html` `https://developer.android.com/reference/android/app/Instrumentation.html#componentName` `open https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/app/Instrumentation.html#context` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#isProfiling` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/android/app/Instrumentation.html#processName` `open https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/app/Instrumentation.html#targetContext` `open https://developer.android.com/reference/android/app/UiAutomation.html` `https://developer.android.com/reference/android/app/Instrumentation.html#uiAutomation`

## Public constructors

### BackupRestoreTestRunner

Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/test-backup#1.0.0-alpha04)

```
BackupRestoreTestRunner()
```

## Public functions

### onCreate

```
open fun onCreate(arguments: Bundle?): Unit
```

### onStart

```
open fun onStart(): Unit
```