# KotlinMultiplatformAndroidDeviceTest

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


```
interface KotlinMultiplatformAndroidDeviceTest
```

<br />

Known direct subclasses [KotlinMultiplatformAndroidDeviceTestCompilation](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTestCompilation)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTestCompilation` |   |

*** ** * ** ***

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#emulatorControl(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/EmulatorControl.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#installation(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Installation.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#managedDevices(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/ManagedDevices.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Configures Gradle Managed Devices for use in testing with the Unified test platform. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#multidex(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/MultiDexConfig.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#signing(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/ApkSigningConfig.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#targetSdk(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/TargetSdkSpec.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Configures all aspects regarding target sdk for device tests, see `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/TargetSdkSpec` for available options. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#animationsDisabled()` Disables animations during instrumented tests you run from the command line. |
| `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/dsl/KotlinMultiplatformAndroidDeviceTest#applicationId()` The test application id. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/EmulatorControl` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#emulatorControl()` Configures Android Emulator Grpc Access |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#enableCoverage()` Specifies code coverage is enabled for module tests of type AndroidTest. |
| `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/dsl/KotlinMultiplatformAndroidDeviceTest#execution()` Specifies whether to use on-device test orchestration. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#functionalTest()` See [instrumentation](http://developer.android.com/guide/topics/manifest/instrumentation-element.html). |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#handleProfiling()` See [instrumentation](http://developer.android.com/guide/topics/manifest/instrumentation-element.html). |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Installation` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#installation()` Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options. |
| `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/dsl/KotlinMultiplatformAndroidDeviceTest#instrumentationRunner()` Test instrumentation runner class name. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/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/dsl/KotlinMultiplatformAndroidDeviceTest#instrumentationRunnerArguments()` Test instrumentation runner custom arguments. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/ManagedDevices` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#managedDevices()` Configures Gradle Managed Devices for use in testing with the Unified test platform. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/MultiDexConfig` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#multidex()` |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/ApkSigningConfig` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/KotlinMultiplatformAndroidDeviceTest#signing()` Encapsulates signing configurations that you can apply to test APK |

## Public functions

### emulatorControl

Added in 8.8.0

```
@Incubating
fun emulatorControl(action: EmulatorControl.() -> Unit): Unit
```

### installation

Added in 8.8.0

```
fun installation(action: Installation.() -> Unit): Unit
```

Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Installation`.

### managedDevices

Added in 8.8.0

```
fun managedDevices(action: ManagedDevices.() -> Unit): Unit
```

Configures Gradle Managed Devices for use in testing with the Unified test platform.

### multidex

Added in 8.8.0

```
@Incubating
fun multidex(action: MultiDexConfig.() -> Unit): Unit
```

### signing

Added in 8.8.0

```
fun signing(action: ApkSigningConfig.() -> Unit): Unit
```

### targetSdk

Added in 8.12.0

```
fun targetSdk(action: TargetSdkSpec.() -> Unit): Unit
```

Configures all aspects regarding target sdk for device tests, see `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/TargetSdkSpec` for available options.

## Public properties

### animationsDisabled

Added in 8.8.0

```
var animationsDisabled: Boolean
```

Disables animations during instrumented tests you run from the command line.

If you set this property to `true`, running instrumented tests with Gradle from the command line executes `am instrument` with the `--no-window-animation` flag. By default, this property is set to `false`.

This property does not affect tests that you run using Android Studio. To learn more about running tests from the command line, see [Test from the Command Line](https://d.android.com/studio/test/command-line.html).

### applicationId

Added in 8.8.0

```
var applicationId: String?
```

The test application id.

### emulatorControl

Added in 8.8.0

```
val emulatorControl: EmulatorControl
```

Configures Android Emulator Grpc Access

Android Emulator Grpc Access will make it possible to interact with the emulator over gRPC

```kotlin
emulatorControl {
  enable true
  secondsValid 180
  allowedEndpoints.addAll(
      "/android.emulation.control.EmulatorController/getStatus",
      "/android.emulation.control.EmulatorController/getVmState")
}
```

### enableCoverage

Added in 8.8.0

```
var enableCoverage: Boolean
```

Specifies code coverage is enabled for module tests of type AndroidTest.

If enabled, prepares module class files for code coverage collection such as instrumenting dependent library classes and module classes. This allows for code coverage reports to be generated.

### execution

Added in 8.8.0

```
var execution: String
```

Specifies whether to use on-device test orchestration.

If you want to [use Android Test Orchestrator](https://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator) you need to specify `"ANDROID_TEST_ORCHESTRATOR"`, as shown below. By default, this property is set to `"HOST"`, which disables on-device orchestration.

### functionalTest

Added in 8.8.0

```
var functionalTest: Boolean?
```

See [instrumentation](http://developer.android.com/guide/topics/manifest/instrumentation-element.html).

### handleProfiling

Added in 8.8.0

```
var handleProfiling: Boolean?
```

See [instrumentation](http://developer.android.com/guide/topics/manifest/instrumentation-element.html).

### installation

Added in 8.8.0

```
val installation: Installation
```

Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Installation`.

### instrumentationRunner

Added in 8.8.0

```
var instrumentationRunner: String?
```

Test instrumentation runner class name. This is a fully qualified class name of the runner See [instrumentation](http://developer.android.com/guide/topics/manifest/instrumentation-element.html).

### instrumentationRunnerArguments

Added in 8.8.0

```
val instrumentationRunnerArguments: MutableMap<String, String>
```

Test instrumentation runner custom arguments.

e.g. `[key: "value"]` will give `adb shell am instrument -w -e key value com.example`...

See [instrumentation](http://developer.android.com/guide/topics/manifest/instrumentation-element.html).

Test runner arguments can also be specified from the command line:

```kotlin
./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.size=medium
./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.foo=bar
```

### managedDevices

Added in 8.8.0

```
val managedDevices: ManagedDevices
```

Configures Gradle Managed Devices for use in testing with the Unified test platform.

### multidex

Added in 8.8.0

```
val multidex: MultiDexConfig
```

### signing

Added in 8.8.0

```
val signing: ApkSigningConfig
```

Encapsulates signing configurations that you can apply to test APK

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/ApkSigningConfig`.