# TestVariantProperties

# TestVariantProperties

```
@Incubating interface TestVariantProperties : VariantProperties
```

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [com.android.build.api.variant.TestVariantProperties](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/TestVariantProperties#) |

[VariantProperties](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties)for test-only modules.

## Summary

|                                                                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                                                                      ||
|--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [aaptOptions](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/TestVariantProperties#aaptOptions(kotlin.Function1))`(`action:` `[AaptOptions](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/AaptOptions).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Variant's aaptOptions, initialized by the corresponding global DSL element. |

| ### Inherited functions ||
|---|---|
| From class[VariantProperties](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties) |------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [addBuildConfigField](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties#addBuildConfigField(kotlin.String,%20java.io.Serializable,%20kotlin.String))`(`key:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `value:` `[Serializable](http://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html)`, `comment:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` <br /> Convenience method to add a new Build Config field which value is known at configuration time. <br />                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [addResValue](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties#addResValue(kotlin.String,%20kotlin.String,%20kotlin.String,%20kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `type:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `value:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `comment:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` <br /> Adds a ResValue element to the generated resources. <br />                                                                                                               | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [addResValue](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties#addResValue(kotlin.String,%20kotlin.String,%20org.gradle.api.provider.Provider,%20kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `type:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `value:` `[Provider](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)>`, `comment:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` <br /> Adds a ResValue element to the generated resources. <br /> | ||

|                                                                                                                                                                                                                       ### Properties                                                                                                                                                                                                                       ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[AaptOptions](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/AaptOptions)                                                           | [aaptOptions](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/TestVariantProperties#aaptOptions:com.android.build.api.variant.AaptOptions) Variant's aaptOptions, initialized by the corresponding global DSL element. |
| abstract[Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\>   | [applicationId](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/TestVariantProperties#applicationId:org.gradle.api.provider.Property) Variant's application ID as present in the final manifest file of the APK.       |
| abstract[Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)\<[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)\> | [functionalTest](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/TestVariantProperties#functionalTest:org.gradle.api.provider.Property) The functionalTest value to use to run the tests.                              |
| abstract[Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)\<[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)\> | [handleProfiling](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/TestVariantProperties#handleProfiling:org.gradle.api.provider.Property) The handleProfiling value to use to run the tests.                           |
| abstract[Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\>   | [instrumentationRunner](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/TestVariantProperties#instrumentationRunner:org.gradle.api.provider.Property) The instrumentationRunner to use to run the tests.               |
| abstract[Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?\>  | [testLabel](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/TestVariantProperties#testLabel:org.gradle.api.provider.Property) the test label                                                                           |
| abstract[Provider](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\>   | [testedApplicationId](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/TestVariantProperties#testedApplicationId:org.gradle.api.provider.Provider) The application of the app under tests.                              |

| ### Inherited properties ||
|---|---|
| From class[ComponentProperties](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/ComponentProperties.html#) |--------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Artifacts](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/artifact/Artifacts.html#) | [artifacts](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/ComponentProperties.html#artifacts:com.android.build.api.artifact.Artifacts) <br /> Access to the variant's buildable artifacts for build customization. <br /> | ||
| From class[VariantProperties](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties) |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [MapProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/MapProperty.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html),` `[BuildConfigField](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/BuildConfigField)<out` `[Serializable](http://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html)>> | [buildConfigFields](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties#buildConfigFields:org.gradle.api.provider.MapProperty) <br /> Variant's[BuildConfigField](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/BuildConfigField)which will be generated in the BuildConfig class. <br />                                                                                                                                                     | | [MapProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/MapProperty.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html),` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)>                                                                                                                                          | [manifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties#manifestPlaceholders:org.gradle.api.provider.MapProperty) <br /> [MapProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/MapProperty.html)of the variant's manifest placeholders. Placeholders are organized with a key and a value. The value is a[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)that will be used as is in the merged manifest. <br /> | | [Provider](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)>                                                                                                                                                                                                                                    | [packageName](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties#packageName:org.gradle.api.provider.Provider) <br /> The package name into which some classes are generated <br />                                                                                                                                                                                                                                                                                                       | ||
| From class[ComponentIdentity](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/ComponentIdentity.html#) |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                                                                                                                                                                                                                                            | [buildType](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/ComponentIdentity.html#buildType:kotlin.String) <br /> Build Type name, might be replaced with access to locked DSL object once ready <br />                                                                                                                                                                                      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                                                             | [flavorName](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/ComponentIdentity.html#flavorName:kotlin.String) <br /> The multi-flavor name of the variant. This does not include the build type. If no flavors are present, this is an empty string. The full name of the variant is queried via[getName](https://docs.gradle.org/current/javadoc/org/gradle/api/Named.html#getName()) <br /> | | [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)<[Pair](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html),` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)>> | [productFlavors](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/ComponentIdentity.html#productFlavors:kotlin.collections.List) <br /> List of flavor names, might be replaced with access to locked DSL objects once ready The order is properly sorted based on the associated dimension order <br />                                                                                       | ||

## Public methods

### aaptOptions

```
abstract fun aaptOptions(action: AaptOptions.() -> Unit): Unit
```

Variant's aaptOptions, initialized by the corresponding global DSL element.

## Properties

### aaptOptions

```
abstract val aaptOptions: AaptOptions
```

Variant's aaptOptions, initialized by the corresponding global DSL element.  

### applicationId

```
abstract val applicationId: Property<String>
```

Variant's application ID as present in the final manifest file of the APK.  

### functionalTest

```
abstract val functionalTest: Property<Boolean>
```

The functionalTest value to use to run the tests.  

### handleProfiling

```
abstract val handleProfiling: Property<Boolean>
```

The handleProfiling value to use to run the tests.  

### instrumentationRunner

```
abstract val instrumentationRunner: Property<String>
```

The instrumentationRunner to use to run the tests.  

### testLabel

```
abstract val testLabel: Property<String?>
```

the test label  

### testedApplicationId

```
abstract val testedApplicationId: Provider<String>
```

The application of the app under tests.