# HasHostTests

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


```
interface HasHostTests
```

<br />

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

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ApplicationVariant` | Model for application components that only contains build-time properties. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/LibraryVariant` | Model for library components that only contains build-time properties. |

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

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/KotlinMultiplatformAndroidVariant` | Properties for the main Variant of a kotlin multiplatform android library |

*** ** * ** ***

`https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Variant` that optionally have `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTest` components like `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/UnitTest`.

## 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/HostTest>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HasHostTests#hostTests()` `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html` of Variant's `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTest`, or empty if all host tests (like unit test) for this variant are disabled. |

## Public properties

### hostTests

Added in 8.5.0

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

`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html` of Variant's `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTest`, or empty if all host tests (like unit test) for this variant are disabled. Map keys are the `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTest` name, like HasHostTestsBuilder.UNIT_TEST_TYPE or HasHostTestsBuilder.SCREENSHOT_TEST_TYPE for default host tests.