# TestTaskContext

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

<br />

```
@Incubating
interface TestTaskContext
```

<br />

*** ** * ** ***

## Summary

|                                                                                   ### Public properties                                                                                    |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                           | [suiteName](https://developer.android.com/reference/tools/gradle-api/9.1/com/android/build/api/dsl/TestTaskContext#suiteName()) Suite name the[org.gradle.api.tasks.testing.Test](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html)task is testing.                                                                                                                              |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                           | [targetName](https://developer.android.com/reference/tools/gradle-api/9.1/com/android/build/api/dsl/TestTaskContext#targetName()) [AgpTestSuiteTarget](https://developer.android.com/reference/tools/gradle-api/9.1/com/android/build/api/dsl/AgpTestSuiteTarget)name the[org.gradle.api.tasks.testing.Test](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html)task is targeting. |
| [Collection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-collection/index.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` | [targetedDevices](https://developer.android.com/reference/tools/gradle-api/9.1/com/android/build/api/dsl/TestTaskContext#targetedDevices()) Returns the list of devices this[org.gradle.api.tasks.testing.Test](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html)task targets.                                                                                                   |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                           | [targetedVariant](https://developer.android.com/reference/tools/gradle-api/9.1/com/android/build/api/dsl/TestTaskContext#targetedVariant()) Targeted variant the[org.gradle.api.tasks.testing.Test](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html)task is running against.                                                                                                    |

## Public properties

### suiteName

Added in 8.12.0  

```
val suiteName: String
```

Suite name the[org.gradle.api.tasks.testing.Test](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html)task is testing.

TODO : Maybe replace with TestSuite Variant object once the variant interfaces become public.  

### targetName

Added in 8.12.0  

```
val targetName: String
```

[AgpTestSuiteTarget](https://developer.android.com/reference/tools/gradle-api/9.1/com/android/build/api/dsl/AgpTestSuiteTarget)name the[org.gradle.api.tasks.testing.Test](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html)task is targeting.  

### targetedDevices

Added in 8.12.0  

```
val targetedDevices: Collection<String>
```

Returns the list of devices this[org.gradle.api.tasks.testing.Test](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html)task targets. In case the test runs on the host machine, the list will be empty.  

### targetedVariant

Added in 8.12.0  

```
val targetedVariant: String
```

Targeted variant the[org.gradle.api.tasks.testing.Test](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html)task is running against.

TODO: Replace with[com.android.build.api.variant.Component](https://developer.android.com/reference/tools/gradle-api/9.1/com/android/build/api/variant/Component)?