Skip to content

Execution API

This page describes the ExecutionAPI class.

ExecutionAPI

Class that allows for interacting with executions via API.

Attributes:

Name Type Description
client object

client for sending requests to Typhoon Test Hub API

download_artifacts(execution_id, expression, destination='', no_progress_output=True)

Download artifacts belonging to the Execution matching provided expression.

Parameters:

Name Type Description Default
execution_id int

Identifier of execution

required
expression str

Artifacts selection expression

required
destination str

Directory where file is downloaded; default value is an empty string (file downloaded in working directory)

''
no_progress_output bool

If True, no download progress logs are shown; default value is True

True

Raises:

Type Description
APIException

Response status code not 200

get_info(execution_id)

Obtain details of the Execution with the provided execution identifier.

Parameters:

Name Type Description Default
execution_id int

Identifier of execution

required

Returns:

Name Type Description
data dict

Execution information

Raises:

Type Description
APIException

Response status code not 200

get_status(execution_id)

Obtain status of the Execution with the provided execution identifier.

Parameters:

Name Type Description Default
execution_id int

Identifier of execution

required

Returns:

Name Type Description
status str

Execution status

Raises:

Type Description
APIException

Response status code not 200

wait_until_finished(execution_id, interval=10, timeout=None, ignore_errors=False)

Periodically check the selected Execution's status and waits for the Execution to finish.

Parameters:

Name Type Description Default
execution_id int

Identifier of execution

required
interval int

Short polling interval for checking execution status

10
timeout int

Timeout (in seconds) of waiting for execution to finish

None
ignore_errors bool

Ignore APIException instances if happen (useful when internet connection is unstable)

False

Returns:

Name Type Description
status str

Execution status

Raises:

Type Description
APIException

Response status code not 200 if ignore_error is False