# HasDeviceTestsBuilder

[View Source](https://cs.android.com/search?q=file:com/android/build/api/variant/HasDeviceTestsBuilder.kt+class:com.android.build.api.variant.HasDeviceTestsBuilder) Added in 8.4.0


```
@Incubating
interface HasDeviceTestsBuilder
```

<br />

Known direct subclasses [ApplicationVariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ApplicationVariantBuilder), [DynamicFeatureVariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DynamicFeatureVariantBuilder), [LibraryVariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/LibraryVariantBuilder)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ApplicationVariantBuilder` | Model for application components that only contains configuration-time properties that impacts the build flow. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DynamicFeatureVariantBuilder` | Model for dynamic feature components that only contains configuration-time properties that impacts the build flow. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/LibraryVariantBuilder` | Model for library components that only contains configuration-time properties that impacts the build flow. |

Known indirect subclasses [KotlinMultiplatformAndroidVariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/KotlinMultiplatformAndroidVariantBuilder)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/KotlinMultiplatformAndroidVariantBuilder` | Model for kotlin multiplatform library components that only contains configuration-time properties that impacts the build flow. |

*** ** * ** ***

Interface that marks the potential existence of `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTest` component on a `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Variant`.

This is implemented by select subtypes of `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/VariantBuilder`.

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTestBuilder>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HasDeviceTestsBuilder#deviceTests()` List of `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTestBuilder` for this variant. |

## Public properties

### deviceTests

Added in 8.4.0

```
val deviceTests: Map<String, DeviceTestBuilder>
```

List of `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTestBuilder` for this variant.

The creation of `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTestBuilder` elements is handled by the AGP Plugin and there is no way to add or remove from the list as of now.

| Returns |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTestBuilder>` | a `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html` which keys are unique names within the tested variant like `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTestBuilder#ANDROID_TEST_TYPE()` and the values are `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTestBuilder` for that host test suite. |