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 |
Source code in tth\api\execution.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
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 |
Source code in tth\api\execution.py
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 |
Source code in tth\api\execution.py
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 |
Source code in tth\api\execution.py
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 |