# FailureRetention

# FailureRetention

<br />

```
@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.2/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.2/com/android/build/api/dsl/FailureRetention#maxSnapshots()) **This property is deprecated.**Renamed to maxSnapshotsForTestFailures |

|                                                                                                                                                                                                                                                                                                                                                                                                           ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                            ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| From class[EmulatorSnapshots](https://developer.android.com/reference/tools/gradle-api/7.2/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.2/com/android/build/api/dsl/EmulatorSnapshots#retainAll())`()` Call this function to take unlimited number of test failure snapshots (will ignore maxSnapshotsForTestFailures setting) | |

## Public properties

### enable

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

### maxSnapshots

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