# FailureRetention

# FailureRetention


```
@Incubating interface FailureRetention : EmulatorSnapshots
```

<br />

*** ** * ** ***

| **This interface is deprecated.**   
| Renamed to EmulatorSnapshots

Options for configuring Android Test Retention.

When enabled, Android Test Retention automatically takes emulator snapshots on test failures.

## Summary

|                                                                                                                                       ### Public properties                                                                                                                                        ||
|------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enable](https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/FailureRetention#enable()) **This property is deprecated.** Renamed to enableForTestFailures                   |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [maxSnapshots](https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/FailureRetention#maxSnapshots()) **This property is deprecated.** Renamed to maxSnapshotsForTestFailures |

|                                                                                                                                                                                                                                                                                                                                                                                                                         ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                         ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| From class [com.android.build.api.dsl.EmulatorSnapshots](https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/EmulatorSnapshots) |------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [retainAll](https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/EmulatorSnapshots#retainAll())`()` Call this function to take unlimited number of test failure snapshots (will ignore maxSnapshotsForTestFailures setting) | |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ### Inherited properties                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| From class [com.android.build.api.dsl.EmulatorSnapshots](https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/EmulatorSnapshots) |------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [compressSnapshots](https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/EmulatorSnapshots#compressSnapshots()) Enables snapshot compression.                                             | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enableForTestFailures](https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/EmulatorSnapshots#enableForTestFailures()) Enables automated test failure snapshots.                         | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [maxSnapshotsForTestFailures](https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/EmulatorSnapshots#maxSnapshotsForTestFailures()) Maximum number of failures that would be snapshotted. | |

## Public properties

### enable

```
var enable: Boolean
```
| **This property is deprecated.**   
Renamed to enableForTestFailures  

### maxSnapshots

```
var maxSnapshots: Int
```
| **This property is deprecated.**   
| Renamed to maxSnapshotsForTestFailures