# TestSuiteExecutionClient

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


```
@Incubating
class TestSuiteExecutionClient
```

<br />

*** ** * ** ***

Simple API to retrieve the execution context set by the Test Task before running the junit test engine.

Input parameters can be requested in the DSL by adding `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestEngineInputProperty` to the `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/JUnitEngineSpec#inputs()`.

At execution time, test engines can retrieve the requested parameters values using the `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient#inputParameters()` or the `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient#getInputParameter(kotlin.String)` APIs.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient#DEFAULT_ENV_VARIABLE()` Name of the environment property the junit engine expect to be set. |

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient#default()()` Load the context using the default environment variable set by the test task |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient#withEnvVariable(kotlin.String)(variableName: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Load the context using a specific environment variable. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient#TestSuiteExecutionClient(kotlin.collections.Collection)( inputParameters: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-collection/index.html<https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestEngineInputProperty> )` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient#getInputParameter(kotlin.String)(key: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Retrieve a single input parameter using its name |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-collection/index.html<https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestEngineInputProperty>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/testsuites/TestSuiteExecutionClient#inputParameters()` full list of resolved input parameters. |

## Constants

### DEFAULT_ENV_VARIABLE

```
const val DEFAULT_ENV_VARIABLE: String
```

Name of the environment property the junit engine expect to be set. This environment property will point to a file location which content will be an instance of TestEngineInputProperties serialized as a Json object.

## Public companion functions

### default

Added in 8.13.0

```
@Incubating
fun default(): TestSuiteExecutionClient
```

Load the context using the default environment variable set by the test task

### withEnvVariable

Added in 8.13.0

```
@Incubating
fun withEnvVariable(variableName: String): TestSuiteExecutionClient
```

Load the context using a specific environment variable.

## Public constructors

### TestSuiteExecutionClient

Added in 8.13.0

```
TestSuiteExecutionClient(
    inputParameters: Collection<TestEngineInputProperty>
)
```

## Public functions

### getInputParameter

Added in 8.13.0

```
@Incubating
fun getInputParameter(key: String): String
```

Retrieve a single input parameter using its name

## Public properties

### inputParameters

Added in 8.13.0

```
val inputParameters: Collection<TestEngineInputProperty>
```

full list of resolved input parameters.