Extensions > API reference > testing

testing

Helper methods for Starlark to access testing infrastructure.

ExecutionInfo

ExecutionInfo testing.ExecutionInfo(requirements)

Creates a new execution info provider. Use this provider to specify specialenvironments requirements needed to run tests.

Parameters

Parameter Description
requirements required
A map of string keys and values to indicate special execution requirements, such as hardware platforms, etc. These keys and values are passed to the executor of the test action as parameters to configure the execution environment.

TestEnvironment

TestEnvironmentInfo testing.TestEnvironment(environment, inherited_environment=[])

Creates a new test environment provider. Use this provider to specify extraenvironment variables to be made available during test execution.

Parameters

Parameter Description
environment required
A map of string keys and values that represent environment variables and their values. These will be made available during the test execution.
inherited_environment sequence of strings; default = []
A sequence of names of environment variables. These variables are made available during the test execution with their current value taken from the shell environment. If a variable is contained in both environment and inherited_environment, the value inherited from the shell environment will take precedence if set.