# HasHostTestsBuilder

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


```
@Incubating
interface HasHostTestsBuilder
```

<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/HostTest` components 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/HostTestBuilder>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HasHostTestsBuilder#hostTests()` Variant's `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTestBuilder` configuration to turn on or off screenshot tests and set other screenshot test related settings. |

## Public properties

### hostTests

Added in 8.5.0

```
val hostTests: Map<String, HostTestBuilder>
```

Variant's `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTestBuilder` configuration to turn on or off screenshot tests and set other screenshot test related settings.

| 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/HostTestBuilder>` | 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/HostTestBuilder#UNIT_TEST_TYPE()` or `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTestBuilder#SCREENSHOT_TEST_TYPE()` and the values are `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTestBuilder` for that host test suite. |