# Isolation

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

*** ** * ** ***


```
@MustBeDocumented
@Retention(value = AnnotationRetention.RUNTIME)
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.FUNCTION])
annotation Isolation
```

<br />

*** ** * ** ***

Annotation to override the default automatic clear data behavior of the framework.

Apply this to a test class or test method to configure the sandbox isolation. An annotation on a test method takes precedence over one on its class, and an annotation on a class also applies to its `https://docs.junit.org/current/api/org.junit.jupiter.api/org/junit/jupiter/api/Nested.html` test classes.

A controller that a test class constructor or a `https://docs.junit.org/current/api/org.junit.jupiter.api/org/junit/jupiter/api/BeforeAll.html` method receives follows the annotation of the class, and `https://developer.android.com/reference/kotlin/androidx/test/backup/host/IsolationPolicy#AUTOMATIC` clears the app data when the constructor or method receives it.

## Summary

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

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/test/backup/host/IsolationPolicy` | `https://developer.android.com/reference/kotlin/androidx/test/backup/host/Isolation#value()` The isolation policy to apply. |

## Public constructors

### Isolation

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

```
Isolation(value: IsolationPolicy = IsolationPolicy.AUTOMATIC)
```

## Public properties

### value

```
val value: IsolationPolicy
```

The isolation policy to apply. Defaults to `https://developer.android.com/reference/kotlin/androidx/test/backup/host/IsolationPolicy#AUTOMATIC`.