# TestFixtures

# TestFixtures

```
@Incubating interface TestFixtures : GeneratesAar, HasAndroidResources, Component
```

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

## Summary

| ### Inherited functions ||
|---|---|
| From class[HasAndroidResources](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/HasAndroidResources) |-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ResValue.Key](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ResValue.Key) | [makeResValueKey](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/HasAndroidResources#makeResValueKey(kotlin.String,%20kotlin.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)`)` <br /> Make a[ResValue.Key](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ResValue.Key)to interact with[resValues](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/HasAndroidResources#resValues:org.gradle.api.provider.MapProperty)'s[MapProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/MapProperty.html) <br /> | ||
| From class[Component](https://developer.android.com/reference/tools/gradle-api/7.1/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.1/com/android/build/api/variant/Component#setAsmFramesComputationMode(com.android.build.api.instrumentation.FramesComputationMode))`(`mode:` `[FramesComputationMode](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/instrumentation/FramesComputationMode.html#)`)` <br /> Sets the frame computation mode that will be applied to the bytecode of the classes instrumented by ASM visitors registered through[transformClassesWith](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/Component#transformClassesWith(java.lang.Class,%20com.android.build.api.instrumentation.InstrumentationScope,%20kotlin.Function1)). The default mode is to[copy frames](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/instrumentation/FramesComputationMode.html#ENUM_VALUE:COPY_FRAMES). When setting this multiple times, the mode with the highest enum value will be selected. <br />                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [transformClassesWith](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/Component#transformClassesWith(java.lang.Class,%20com.android.build.api.instrumentation.InstrumentationScope,%20kotlin.Function1))`(`classVisitorFactoryImplClass:` `[Class](http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html)<out` `[AsmClassVisitorFactory](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/instrumentation/AsmClassVisitorFactory.html#)<ParamT>>`, `scope:` `[InstrumentationScope](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/instrumentation/InstrumentationScope.html#)`, `instrumentationParamsConfig:` `(ParamT)` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` <br /> Registers an asm class visitor to instrument the classes defined by the given scope. An instance of the factory will be instantiated and used to create visitors for each class. Example: ```scdoc androidComponentsExtension.onVariants(selector().all(), { transformClassesWith(AsmClassVisitorFactoryImpl.class, InstrumentationScope.Project) { params -> params.x = "value" } setAsmFramesComputationMode(COMPUTE_FRAMES_FOR_INSTRUMENTED_METHODS) }) ``` <br /> | ||

|                                                                                                                                                                                         ### Properties                                                                                                                                                                                         ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 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)\> | [namespace](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/TestFixtures#namespace:org.gradle.api.provider.Provider) The namespace of the generated R class. |

| ### Inherited properties ||
|---|---|
| From class[GeneratesAar](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/GeneratesAar) |-----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AarMetadata](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/AarMetadata) | [aarMetadata](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/GeneratesAar#aarMetadata:com.android.build.api.variant.AarMetadata) <br /> Variant's aar metadata, initialized by merging the corresponding[com.android.build.api.dsl.AarMetadata](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AarMetadata.html#)DSL elements. <br /> | ||
| From class[Component](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/Component) |-------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Artifacts](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/artifact/Artifacts.html#)      | [artifacts](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/Component#artifacts:com.android.build.api.artifact.Artifacts) <br /> Access to the variant's buildable artifacts for build customization. <br /> | | [JavaCompilation](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/JavaCompilation) | [javaCompilation](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/Component#javaCompilation:com.android.build.api.variant.JavaCompilation) <br /> Access to the variant's java compilation options. <br />   | ||
| From class[ComponentIdentity](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ComponentIdentity) |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                                                                                                                                                                                                                                            | [buildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/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/7.1/com/android/build/api/variant/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 will return null The full name of the variant is queried via[name](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ComponentIdentity#name:kotlin.String). <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                                                             | [name](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ComponentIdentity#name:kotlin.String) <br /> Component's name. <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/7.1/com/android/build/api/variant/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[HasAndroidResources](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/HasAndroidResources) |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [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)>                                                                                                                                                               | [pseudoLocalesEnabled](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/HasAndroidResources#pseudoLocalesEnabled:org.gradle.api.provider.Property) <br /> Variant's is pseudo locales enabled, initialized by the corresponding DSL elements. <br />                                           | | [MapProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/MapProperty.html)<[ResValue.Key](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ResValue.Key),` `[ResValue](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ResValue)> | [resValues](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/HasAndroidResources#resValues:org.gradle.api.provider.MapProperty) <br /> Variant's[ResValue](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ResValue)which will be generated. <br /> | ||

## Properties

### namespace

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

The namespace of the generated R class. Also, the namespace used to resolve any relative class names that are declared in the AndroidManifest.xml.