Set to true if the variant's has any android tests, false otherwise. Value is Boolean#True by default.
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,["# HasAndroidTestBuilder\n=====================\n\n\n```\ninterface HasAndroidTestBuilder\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[ApplicationVariantBuilder](/reference/tools/gradle-api/8.0/com/android/build/api/variant/ApplicationVariantBuilder), [DynamicFeatureVariantBuilder](/reference/tools/gradle-api/8.0/com/android/build/api/variant/DynamicFeatureVariantBuilder), [LibraryVariantBuilder](/reference/tools/gradle-api/8.0/com/android/build/api/variant/LibraryVariantBuilder) \n\n|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|\n| [ApplicationVariantBuilder](/reference/tools/gradle-api/8.0/com/android/build/api/variant/ApplicationVariantBuilder) | Application specific variant object that contains properties that will determine the variant's build flow. |\n| [DynamicFeatureVariantBuilder](/reference/tools/gradle-api/8.0/com/android/build/api/variant/DynamicFeatureVariantBuilder) | |\n| [LibraryVariantBuilder](/reference/tools/gradle-api/8.0/com/android/build/api/variant/LibraryVariantBuilder) | [VariantBuilder](/reference/tools/gradle-api/8.0/com/android/build/api/variant/VariantBuilder) type for library projects |\n\n*** ** * ** ***\n\nInterface that mark the potential existence of android tests associated with a variant.\n\nSummary\n-------\n\n| ### Public properties ||\n|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [androidTestEnabled](/reference/tools/gradle-api/8.0/com/android/build/api/variant/HasAndroidTestBuilder#androidTestEnabled()) **This property is deprecated.** replaced with enableAndroidTest |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enableAndroidTest](/reference/tools/gradle-api/8.0/com/android/build/api/variant/HasAndroidTestBuilder#enableAndroidTest()) Set to `true` if the variant's has any android tests, false otherwise. |\n\nPublic properties\n-----------------\n\n### androidTestEnabled\n\n```\nvar androidTestEnabled: Boolean\n```\n| **This property is deprecated.** \n| replaced with enableAndroidTest\n\nSet to `true` if the variant's has any android tests, false otherwise. Value is Boolean#True by default. \n\n### enableAndroidTest\n\n```\nvar enableAndroidTest: Boolean\n```\n\nSet to `true` if the variant's has any android tests, false otherwise. Value is Boolean#True by default."]]