Stay organized with collections
Save and categorize content based on your preferences.
FailureRetention
@Incubating interface FailureRetention : EmulatorSnapshots
Options for configuring Android Test Retention.
When enabled, Android Test Retention automatically takes emulator snapshots on test failures.
Summary
Inherited functions
|
From class EmulatorSnapshots
Unit |
retainAll()
Call this function to take unlimited number of test failure snapshots (will ignore
maxSnapshotsForTestFailures setting)
|
|
Properties
enable
abstract var enable: Boolean
Deprecated.
maxSnapshots
abstract var maxSnapshots: Int
Deprecated.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# FailureRetention\n================\n\n```\n@Incubating interface FailureRetention : EmulatorSnapshots\n```\n\n|-------------------------------------------------|\n| [com.android.build.api.dsl.FailureRetention](#) |\n\nOptions for configuring Android Test Retention.\n\nWhen enabled, Android Test Retention automatically takes emulator snapshots on test failures.\n\nSummary\n-------\n\n| ### Inherited functions ||\n|---|---|\n| From class [EmulatorSnapshots](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/EmulatorSnapshots) |------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [retainAll](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/EmulatorSnapshots#retainAll())`()` Call this function to take unlimited number of test failure snapshots (will ignore maxSnapshotsForTestFailures setting) \u003cbr /\u003e | ||\n\n| ### Properties ||\n|---------------------------------------------------------------------------------------------|-------------------------------------------------|\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enable](#enable:kotlin.Boolean) \u003cbr /\u003e |\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [maxSnapshots](#maxSnapshots:kotlin.Int) \u003cbr /\u003e |\n\n| ### Inherited properties ||\n|---|---|\n| From class [EmulatorSnapshots](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/EmulatorSnapshots) |------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [compressSnapshots](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/EmulatorSnapshots#compressSnapshots:kotlin.Boolean) Enables snapshot compression. Default to false. \u003cbr /\u003e | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enableForTestFailures](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/EmulatorSnapshots#enableForTestFailures:kotlin.Boolean) Enables automated test failure snapshots. Default to false. \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [maxSnapshotsForTestFailures](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/EmulatorSnapshots#maxSnapshotsForTestFailures:kotlin.Int) Maximum number of failures that would be snapshotted. Any failures after the first $maxSnapshotsForTestFailures will not have snapshots. Default to 2. Must be \\\u003e0 \u003cbr /\u003e | ||\n\nProperties\n----------\n\n### enable\n\n```\nabstract var enable: Boolean\n```\n\n**Deprecated.** \n\n### maxSnapshots\n\n```\nabstract var maxSnapshots: Int\n```\n\n**Deprecated.**"]]