TestSuiteExecutionClient

Added in 8.13.0-alpha01

@Incubating
class TestSuiteExecutionClient


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 TestEngineInputProperty to the com.android.build.api.dsl.JUnitEngineSpec.inputs.

At execution time, test engines can retrieve the requested parameters values using the inputParameters or the getInputParameter APIs.

Summary

Constants

const String

Name of the environment property the junit engine expect to be set.

Public companion functions

TestSuiteExecutionClient

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

TestSuiteExecutionClient

Load the context using a specific environment variable.

Public constructors

Public functions

String

Retrieve a single input parameter using its name

Public properties

Collection<TestEngineInputProperty>

full list of resolved input parameters.

Constants

DEFAULT_ENV_VARIABLE

const val DEFAULT_ENV_VARIABLEString

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-alpha01
@Incubating
fun default(): TestSuiteExecutionClient

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

withEnvVariable

Added in 8.13.0-alpha01
@Incubating
fun withEnvVariable(variableName: String): TestSuiteExecutionClient

Load the context using a specific environment variable.

Public constructors

TestSuiteExecutionClient

Added in 8.13.0-alpha01
TestSuiteExecutionClient(
    inputParameters: Collection<TestEngineInputProperty>
)

Public functions

getInputParameter

Added in 8.13.0-alpha01
@Incubating
fun getInputParameter(key: String): String

Retrieve a single input parameter using its name

Public properties

inputParameters

Added in 8.13.0-alpha01
val inputParametersCollection<TestEngineInputProperty>

full list of resolved input parameters.