# TestVariant

# TestVariant

<br />

```
interface TestVariant : GeneratesApk, GeneratesTestApk, ComponentIdentity, Component, HasAndroidResources, Variant
```

<br />

*** ** * ** ***

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

## Summary

|                                                                                                                                                                                        ### Public properties                                                                                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [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/7.2/com/android/build/api/variant/TestVariant#applicationId()) Variant's application ID as present in the final manifest file of the APK. |
| [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/7.2/com/android/build/api/variant/TestVariant#testedApplicationId()) The application of the app under tests.                        |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| From class[Component](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Component) |------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | ~~[setAsmFramesComputationMode](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Component#setAsmFramesComputationMode(com.android.build.api.instrumentation.FramesComputationMode))~~`(mode: `[FramesComputationMode](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/instrumentation/FramesComputationMode)`?)` **This function is deprecated.**Use the instrumentation block.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `<ParamT : `[InstrumentationParameters](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/instrumentation/InstrumentationParameters)`?> `~~[transformClassesWith](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Component#transformClassesWith(java.lang.Class,com.android.build.api.instrumentation.InstrumentationScope,kotlin.Function1))~~`(` ` classVisitorFactoryImplClass: `[Class](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html)`<`[AsmClassVisitorFactory](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/instrumentation/AsmClassVisitorFactory)`<ParamT?>?>?,` ` scope: `[InstrumentationScope](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/instrumentation/InstrumentationScope)`?,` ` instrumentationParamsConfig: ((ParamT) `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)?` `)` **This function is deprecated.**Use the instrumentation block. | |
| From class[HasAndroidResources](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/HasAndroidResources) |-------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ResValue.Key](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/ResValue.Key) | [makeResValueKey](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/HasAndroidResources#makeResValueKey(kotlin.String,kotlin.String))`(type: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, name: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?)` Make a[ResValue.Key](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/ResValue.Key)to interact with[resValues](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/HasAndroidResources#resValues())'s[MapProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/MapProperty.html) |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| From class[Variant](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Variant) |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `T?` | `<T : `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?> `[getExtension](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Variant#getExtension(java.lang.Class))`(type: `[Class](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html)`<T?>?)` Returns an extension object registered via the[VariantBuilder.registerExtension](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantBuilder#registerExtension(java.lang.Class,kotlin.Any))API or null if none were registered under the passed[type](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Variant#getExtension(java.lang.Class)). |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

## Public properties

### applicationId

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

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

### testedApplicationId

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

The application of the app under tests.