# AndroidTestProperties

# AndroidTestProperties

```
@Incubating interface AndroidTestProperties : TestComponentProperties
```

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

Properties for the android test Variant of a module

## 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/component/AndroidTestProperties#aaptOptions(kotlin.Function1))`(`action:` `[AaptOptions](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/AaptOptions.html#).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Variant's aaptOptions, initialized by the corresponding global DSL element.                                                                                                                                                                                                                                                                                            |
| abstract[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/component/AndroidTestProperties#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)?`)` Adds a ResValue element to the generated resources.                                                                                                               |
| abstract[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/component/AndroidTestProperties#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)?`)` Adds a ResValue element to the generated resources. |

|                                                                                                                                                                                                                                                                                                                                                                                                        ### Properties                                                                                                                                                                                                                                                                                                                                                                                                        ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[AaptOptions](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/AaptOptions.html#)                                                                                                                                                                                                                                                                                           | [aaptOptions](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/AndroidTestProperties#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/component/AndroidTestProperties#applicationId:org.gradle.api.provider.Property) Variant's application ID as present in the final manifest file of the APK.                                                                                                                                 |
| abstract[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),out[BuildConfigField](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/BuildConfigField.html#)\<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/component/AndroidTestProperties#buildConfigFields:org.gradle.api.provider.MapProperty) Variant's[BuildConfigField](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/BuildConfigField.html#)which will be generated in the BuildConfig class. |
| 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/component/AndroidTestProperties#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/component/AndroidTestProperties#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/component/AndroidTestProperties#instrumentationRunner:org.gradle.api.provider.Property) The instrumentationRunner to use to run the tests.                                                                                                                                         |
| abstract[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/component/AndroidTestProperties#manifestPlaceholders:org.gradle.api.provider.MapProperty) [MapProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/MapProperty.html)of the variant's manifest placeholders.                                                    |
| 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)\>                                                                                                                                                                                                                                         | [packageName](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/AndroidTestProperties#packageName:org.gradle.api.provider.Provider) The package name into which some classes are generated                                                                                                                                                         |
| 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/component/AndroidTestProperties#testLabel:org.gradle.api.provider.Property) the test label                                                                                                                                                                                                     |

| ### Inherited properties ||
|---|---|
| From class[ComponentProperties](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/ComponentProperties) |--------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [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#artifacts:com.android.build.api.artifact.Artifacts) <br /> Access to the variant's buildable artifacts for build customization. <br /> | ||
| From class[ComponentIdentity](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/ComponentIdentity) |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [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#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#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#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 />                                                                                       | ||
| From class[TestComponentProperties](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/TestComponentProperties) |-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [VariantProperties](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/VariantProperties.html#) | [testedVariant](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/component/TestComponentProperties#testedVariant:com.android.build.api.variant.VariantProperties) <br /> | ||

## Public methods

### aaptOptions

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

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

### addResValue

```
abstract fun addResValue(
    name: String, 
    type: String, 
    value: String, 
    comment: String?
): Unit
```

Adds a ResValue element to the generated resources.

|                                                                              Parameters                                                                               ||
|-------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| name:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)     | the resource name                                                          |
| type:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)     | the resource type like 'string'                                            |
| value:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)    | the resource value                                                         |
| comment:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | optional comment to be added to the generated resource file for the field. |

### addResValue

```
abstract fun addResValue(
    name: String, 
    type: String, 
    value: Provider<String>, 
    comment: String?
): Unit
```

Adds a ResValue element to the generated resources.

|                                                                                                                                          Parameters                                                                                                                                          ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| name:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                               | the resource name                                                                                       |
| type:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                               | the resource type like 'string'                                                                         |
| 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)\> | a[Provider](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html)for the value |
| comment:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                                                                           | optional comment to be added to the generated resource file for the field.                              |

## 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.  

### buildConfigFields

```
abstract val buildConfigFields: MapProperty<String, out BuildConfigField<out Serializable>>
```

Variant's[BuildConfigField](https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/BuildConfigField.html#)which will be generated in the BuildConfig class.  

### 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.  

### manifestPlaceholders

```
abstract val manifestPlaceholders: MapProperty<String, String>
```

[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.

| Return ||
|---|---|
| the[MapProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/MapProperty.html)with keys as[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) ||

### packageName

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

The package name into which some classes are generated  

### testLabel

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

the test label