Stay organized with collections
Save and categorize content based on your preferences.
@Incubating interface DeviceTestRunInput : Serializable
Interface that represents input into the Instrumented Test Task, created by a DeviceTestRunConfigureAction
, to be consumed by the 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
, Nested
or Internal
to ensure proper caching of test results.
Additionally, making the type compatible with ObjectFactory.newInstance
makes implementing the DeviceTestRunConfigureAction
easier. See: DeviceTestRunConfureAction
Example Implementation:
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>
}
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DeviceTestRunInput\n==================\n\n\n```\n@Incubating interface DeviceTestRunInput : Serializable\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface that represents input into the Instrumented Test Task, created by a [DeviceTestRunConfigureAction](/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunConfigureAction), to be consumed by the [DeviceTestRunTaskAction](/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunTaskAction).\n\nThis 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.\n\nAdditionally, 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](/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunConfigureAction) easier. See: DeviceTestRunConfureAction\n\nExample Implementation: \n\n```scalate-server-page\nabstract class CustomInput: DeviceTestRunInput {\n /** name of device from DSL */\n @get: Input\n abstract val deviceName: Property\u003cString\u003e\n\n /** Id of device in a device farm, for example*/\n @get: Input\n abstract val deviceId: Property\u003cInt\u003e\n\n @get: Internal\n abstract val timeoutSeconds: Property\u003cInt\u003e\n }\n```"]]