# StaticTestData

# StaticTestData

<br />

```
@Incubating interface StaticTestData
```

<br />

*** ** * ** ***

Interface for retrieving all test data for a given test invocation for use by the[DeviceTestRunTaskAction](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunTaskAction).

This is supplied to the[DeviceTestRunTaskAction](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunTaskAction)as a part of the[DeviceTestRunParameters.testRunData](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/DeviceTestRunParameters#testRunData())

## Summary

|                                                                                                                                                                                                                                                                                                                                ### Public properties                                                                                                                                                                                                                                                                                                                                 ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                       | [applicationId](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#applicationId()) The application ID of the test APK.                                                                                                                                                                         |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                       | [instrumentationRunner](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#instrumentationRunner()) The class name for the Test Instrumentation Runner.                                                                                                                                         |
| [Map](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>`                                       | [instrumentationRunnerArguments](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#instrumentationRunnerArguments()) The arguments that should be passed to the InstrumentationRunner.                                                                                                         |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                       | [instrumentationTargetPackageId](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#instrumentationTargetPackageId()) The instrumentation target application id.                                                                                                                                |
| [AndroidVersion](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/AndroidVersion)                                                                                                                                                                            | [minSdkVersion](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#minSdkVersion()) The minimum SDK version required to test the given[testApk](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testApk()).     |
| [File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)                                                                                                                                                                                                                 | [testApk](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testApk()) The APK containing the tests.                                                                                                                                                                                           |
| [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`?>`                                                                                                                  | [testDirectories](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testDirectories()) List of the directories of all test sources in the[testApk](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testApk()). |
| `(`[<ERROR CLASS>](https://developer.android.com/reference/tools/gradle-api/8.1/[JVM root]/<ERROR CLASS>)`) `->` `[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`>` | [testedApkFinder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testedApkFinder()) Returns the APK files to install based on given Device Configuration (such as abi and screen density).                                                                                                  |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                                                                                                                                                                                                                    | [testedApplicationId](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testedApplicationId()) The application ID of the APK under test.                                                                                                                                                       |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                       | [testedDescription](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testedDescription()) The description of the APK under test.                                                                                                                                                              |

## Public properties

### applicationId

```
val applicationId: String
```

The application ID of the test APK.  

### instrumentationRunner

```
val instrumentationRunner: String
```

The class name for the Test Instrumentation Runner.  

### instrumentationRunnerArguments

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

The arguments that should be passed to the InstrumentationRunner.  

### instrumentationTargetPackageId

```
val instrumentationTargetPackageId: String
```

The instrumentation target application id.

If this is a self instrumenting test, then this value will be the same a[applicationId](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#applicationId()). Otherwise, the instrumentation target will be the same as[testedApplicationId](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testedApplicationId()).  

### minSdkVersion

```
val minSdkVersion: AndroidVersion
```

The minimum SDK version required to test the given[testApk](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testApk()).  

### testApk

```
val testApk: File
```

The APK containing the tests.  

### testDirectories

```
val testDirectories: List<File?>
```

List of the directories of all test sources in the[testApk](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/instrumentation/manageddevice/StaticTestData#testApk()).  

### testedApkFinder

```
val testedApkFinder: (<ERROR CLASS>) -> List<File>
```

Returns the APK files to install based on given Device Configuration (such as abi and screen density).

If no such APK can be found, an empty list is returned.  

### testedApplicationId

```
val testedApplicationId: String?
```

The application ID of the APK under test.

This can be null if there is no such APK. For example, android-test in library module does not have a tested-application.  

### testedDescription

```
val testedDescription: String
```

The description of the APK under test.