TestTaskContext

Added in 8.12.0

@Incubating
interface TestTaskContext


Summary

Public properties

Boolean

Whether the org.gradle.api.tasks.testing.Test task is an update task.

String

Suite name the org.gradle.api.tasks.testing.Test task is testing.

String

AgpTestSuiteTarget name the org.gradle.api.tasks.testing.Test task is targeting.

Collection<String>

Returns the list of devices this org.gradle.api.tasks.testing.Test task targets.

String

Targeted variant the org.gradle.api.tasks.testing.Test task is running against.

Public properties

isUpdateTask

Added in 9.5.0-alpha07
val isUpdateTask: Boolean

Whether the org.gradle.api.tasks.testing.Test task is an update task.

suiteName

Added in 8.12.0
val suiteName: String

Suite name the org.gradle.api.tasks.testing.Test 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 name the org.gradle.api.tasks.testing.Test 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 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 task is running against.

TODO: Replace with com.android.build.api.variant.Component ?