Stay organized with collections
Save and categorize content based on your preferences.
DeviceTestRunTaskAction
@Incubating interface DeviceTestRunTaskAction<InputT : DeviceTestRunInput>
The Action for running the Test within the test Task.
This is the action to perform all of the test behavior for the given Custom Managed Device. This includes:
-
Setting up the device for testing
-
Installing all apks necessary for the test
-
Running the tests
-
Any clean up for the device.
This should be implemented for use with a Custom Managed Device Registration.
Summary
Public functions
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,["# DeviceTestRunTaskAction\n=======================\n\n\n```\n@Incubating interface DeviceTestRunTaskAction\u003cInputT : DeviceTestRunInput\u003e\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThe Action for running the Test within the test Task.\n\nThis is the action to perform all of the test behavior for the given Custom Managed Device. This includes:\n\n1. Setting up the device for testing\n\n2. Installing all apks necessary for the test\n\n3. Running the tests\n\n4. Any clean up for the device.\n\nThis should be implemented for use with a Custom Managed Device Registration. \n\n| Parameters ||\n|---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `\u003cInputT : `[DeviceTestRunInput](/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunInput)`\u003e` | The Custom Managed Device specific input to be passed in as part of the [DeviceTestRunParameters](/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunParameters) when the tests are run. |\n\nSummary\n-------\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [runTests](/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunTaskAction#runTests(com.android.build.api.instrumentation.manageddevice.DeviceTestRunParameters))`(params: `[DeviceTestRunParameters](/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunParameters)`\u003cInputT\u003e)` Runs the tests with the given parameters. |\n\nPublic functions\n----------------\n\n### runTests\n\n```\n@Incubating\nfun runTests(params: DeviceTestRunParameters\u003cInputT\u003e): Boolean\n```\n\nRuns the tests with the given parameters. \n\n| Parameters ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|\n| `params: `[DeviceTestRunParameters](/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunParameters)`\u003cInputT\u003e` | All parameters required to run this test. |\n\n| Returns ||\n|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | returns true if and only if all tests passed. Determines if the task succeeds or fails. |"]]