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

*** ** * ** ***


```
public final class BackupRestoreTestRunner extends Instrumentation
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [android.app.Instrumentation](https://developer.android.com/reference/android/app/Instrumentation.html) ||
|   | ↳ | [androidx.test.backup.BackupRestoreTestRunner](https://developer.android.com/reference/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/androidx/test/backup/BackupDeviceAction`, and returns its result. Actions can get this instrumentation from `https://developer.android.com/reference/androidx/test/platform/app/InstrumentationRegistry`.

## Summary

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

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/test/backup/BackupRestoreTestRunner#onCreate(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle.html arguments)` |
| `void` | `https://developer.android.com/reference/androidx/test/backup/BackupRestoreTestRunner#onStart()()` |

### Inherited methods

From [android.app.Instrumentation](https://developer.android.com/reference/android/app/Instrumentation.html) `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/TestLooperManager.html` `https://developer.android.com/reference/android/app/Instrumentation.html#acquireLooperManager(android.os.Looper)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Looper.html looper)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#addMonitor(android.app.Instrumentation.ActivityMonitor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html monitor)` `@https://developer.android.com/reference/androidx/annotation/NonNull 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)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html cls,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Instrumentation.ActivityResult.html result,
boolean block
)` `@https://developer.android.com/reference/androidx/annotation/NonNull 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)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentFilter.html filter,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Instrumentation.ActivityResult.html result,
boolean block
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#addResults(android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html results)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnCreate(android.app.Activity, android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html icicle)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnCreate(android.app.Activity, android.os.Bundle, android.os.PersistableBundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html icicle,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/PersistableBundle.html persistentState
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnDestroy(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnNewIntent(android.app.Activity, android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnNewIntent(android.app.Activity, android.content.Intent, android.app.ComponentCaller)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/ComponentCaller.html caller
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPause(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPictureInPictureRequested(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPostCreate(android.app.Activity, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity,
https://developer.android.com/reference/android/os/Bundle.html savedInstanceState
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnPostCreate(android.app.Activity, android.os.Bundle, android.os.PersistableBundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity,
https://developer.android.com/reference/android/os/Bundle.html savedInstanceState,
https://developer.android.com/reference/android/os/PersistableBundle.html persistentState
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnRestart(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnRestoreInstanceState(android.app.Activity, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html savedInstanceState
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnRestoreInstanceState(android.app.Activity, android.os.Bundle, android.os.PersistableBundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity,
https://developer.android.com/reference/android/os/Bundle.html savedInstanceState,
https://developer.android.com/reference/android/os/PersistableBundle.html persistentState
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnResume(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnSaveInstanceState(android.app.Activity, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html outState
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnSaveInstanceState(android.app.Activity, android.os.Bundle, android.os.PersistableBundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html outState,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/PersistableBundle.html outPersistentState
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnStart(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnStop(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callActivityOnUserLeaving(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#callApplicationOnCreate(android.app.Application)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Application.html app)` `boolean` `https://developer.android.com/reference/android/app/Instrumentation.html#checkMonitorHit(android.app.Instrumentation.ActivityMonitor, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html monitor,
int minHits
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#endPerformanceSnapshot()()` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#finish(int, android.os.Bundle)(int resultCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html results)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` `https://developer.android.com/reference/android/app/Instrumentation.html#getAllocCounts()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` `https://developer.android.com/reference/android/app/Instrumentation.html#getBinderCounts()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html` `https://developer.android.com/reference/android/app/Instrumentation.html#getComponentName()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/app/Instrumentation.html#getContext()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/app/Instrumentation.html#getProcessName()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/app/Instrumentation.html#getTargetContext()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/UiAutomation.html` `https://developer.android.com/reference/android/app/Instrumentation.html#getUiAutomation()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/UiAutomation.html` `https://developer.android.com/reference/android/app/Instrumentation.html#getUiAutomation(int)(int flags)` `boolean` `https://developer.android.com/reference/android/app/Instrumentation.html#invokeContextMenuAction(android.app.Activity, int, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html targetActivity,
int id,
int flag
)` `boolean` `https://developer.android.com/reference/android/app/Instrumentation.html#invokeMenuActionSync(android.app.Activity, int, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html targetActivity, int id, int flag)` `boolean` `https://developer.android.com/reference/android/app/Instrumentation.html#isProfiling()()` `@https://developer.android.com/reference/androidx/annotation/NonNull 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)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/ClassLoader.html cl,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html className,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent
)` `@https://developer.android.com/reference/androidx/annotation/NonNull 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)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?> clazz,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/IBinder.html token,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Application.html application,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/pm/ActivityInfo.html info,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html title,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html parent,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html lastNonConfigurationInstance
)` `@https://developer.android.com/reference/androidx/annotation/NonNull 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)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/ClassLoader.html cl,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html className,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context
)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#onDestroy()()` `boolean` `https://developer.android.com/reference/android/app/Instrumentation.html#onException(java.lang.Object, java.lang.Throwable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html obj, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html e)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#removeMonitor(android.app.Instrumentation.ActivityMonitor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html monitor)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#resetInTouchMode()()` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#runOnMainSync(java.lang.Runnable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Runnable.html runner)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#sendCharacterSync(int)(int keyCode)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#sendKeyDownUpSync(int)(int keyCode)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#sendKeySync(android.view.KeyEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/KeyEvent.html event)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#sendPointerSync(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html event)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#sendStatus(int, android.os.Bundle)(int resultCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html results)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#sendStringSync(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html text)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#sendTrackballEventSync(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html event)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#setAutomaticPerformanceSnapshots()()` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#setInTouchMode(boolean)(boolean inTouch)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#start()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html` `https://developer.android.com/reference/android/app/Instrumentation.html#startActivitySync(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `@https://developer.android.com/reference/androidx/annotation/NonNull 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)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/Bundle.html options)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#startAllocCounting()()` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#startPerformanceSnapshot()()` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#startProfiling()()` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#stopAllocCounting()()` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#stopProfiling()()` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#waitForIdle(java.lang.Runnable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Runnable.html recipient)` `void` `https://developer.android.com/reference/android/app/Instrumentation.html#waitForIdleSync()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html` `https://developer.android.com/reference/android/app/Instrumentation.html#waitForMonitor(android.app.Instrumentation.ActivityMonitor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html monitor)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html` `https://developer.android.com/reference/android/app/Instrumentation.html#waitForMonitorWithTimeout(android.app.Instrumentation.ActivityMonitor, long)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Instrumentation.ActivityMonitor.html monitor,
long timeOut
)`

## Public constructors

### BackupRestoreTestRunner

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

```
public BackupRestoreTestRunner()
```

## Public methods

### onCreate

```
public void onCreate(Bundle arguments)
```

### onStart

```
public void onStart()
```