Stay organized with collections
Save and categorize content based on your preferences.
HasAndroidTest
interface HasAndroidTest
Variants that optionally have instrumented tests.
Summary
Public properties |
AndroidTest? |
Variant's AndroidTest configuration, or null if android tests are disabled for this variant.
|
Public properties
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# HasAndroidTest\n==============\n\n\n```\ninterface HasAndroidTest\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[ApplicationVariant](/reference/tools/gradle-api/8.0/com/android/build/api/variant/ApplicationVariant), [DynamicFeatureVariant](/reference/tools/gradle-api/8.0/com/android/build/api/variant/DynamicFeatureVariant), [LibraryVariant](/reference/tools/gradle-api/8.0/com/android/build/api/variant/LibraryVariant) \n\n|--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| [ApplicationVariant](/reference/tools/gradle-api/8.0/com/android/build/api/variant/ApplicationVariant) | Properties for the main Variant of an application. |\n| [DynamicFeatureVariant](/reference/tools/gradle-api/8.0/com/android/build/api/variant/DynamicFeatureVariant) | |\n| [LibraryVariant](/reference/tools/gradle-api/8.0/com/android/build/api/variant/LibraryVariant) | [Variant](/reference/tools/gradle-api/8.0/com/android/build/api/variant/Variant) for Library projects |\n\n*** ** * ** ***\n\nVariants that optionally have instrumented tests.\n\nSummary\n-------\n\n| ### Public properties ||\n|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AndroidTest](/reference/tools/gradle-api/8.0/com/android/build/api/variant/AndroidTest)`?` | [androidTest](/reference/tools/gradle-api/8.0/com/android/build/api/variant/HasAndroidTest#androidTest()) Variant's [AndroidTest](/reference/tools/gradle-api/8.0/com/android/build/api/variant/AndroidTest) configuration, or null if android tests are disabled for this variant. |\n\nPublic properties\n-----------------\n\n### androidTest\n\n```\nval androidTest: AndroidTest?\n```\n\nVariant's [AndroidTest](/reference/tools/gradle-api/8.0/com/android/build/api/variant/AndroidTest) configuration, or null if android tests are disabled for this variant."]]