# DeviceTestRunInput

# DeviceTestRunInput

<br />

```
@Incubating interface DeviceTestRunInput : Serializable
```

<br />

*** ** * ** ***

Interface that represents input into the Instrumented Test Task, created by a[DeviceTestRunConfigureAction](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunConfigureAction), to be consumed by the[DeviceTestRunTaskAction](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunTaskAction).

This interface should be implemented for use with a Custom Managed Device Registration. The implementation of this class is used as an input into the Managed Device Test Task. Therefore, all properities on the implementation of this interface*must* be marked with[Input](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/Input.html),[Nested](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/Nested.html)or[Internal](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/Internal.html)to ensure proper caching of test results.

Additionally, making the type compatible with[ObjectFactory.newInstance](https://docs.gradle.org/current/javadoc/org/gradle/api/model/ObjectFactory.html#newInstance-java.lang.Class[TypeParam(bounds=[kotlin.Any])]-kotlin.Array[kotlin.Any]-)makes implementing the[DeviceTestRunConfigureAction](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunConfigureAction)easier. See: DeviceTestRunConfureAction

Example Implementation:  

```scalate-server-page
abstract class CustomInput: DeviceTestRunInput {
    /** name of device from DSL */
    @get: Input
    abstract val deviceName: Property<String>

    /** Id of device in a device farm, for example*/
        @get: Input
        abstract val deviceId: Property<Int>

        @get: Internal
        abstract val timeoutSeconds: Property<Int>
    }
```