Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion testit-adapter-behave/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = "3.10.7"
VERSION = "3.10.8"

setup(
name='testit-adapter-behave',
Expand Down
2 changes: 1 addition & 1 deletion testit-adapter-nose/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

VERSION = "3.10.7"
VERSION = "3.10.8"

setup(
name='testit-adapter-nose',
Expand Down
2 changes: 1 addition & 1 deletion testit-adapter-pytest/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = "3.10.7"
VERSION = "3.10.8"

setup(
name='testit-adapter-pytest',
Expand Down
2 changes: 1 addition & 1 deletion testit-adapter-robotframework/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = "3.10.7"
VERSION = "3.10.8"

setup(
name='testit-adapter-robotframework',
Expand Down
2 changes: 1 addition & 1 deletion testit-python-commons/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = "3.10.7"
VERSION = "3.10.8"

setup(
name='testit-python-commons',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __get_api_client(api_client_config: Configuration, token: str) -> ApiClient:
header_value='PrivateToken ' + token)

@adapter_logger
@retry
def create_test_run(self, test_run_name: str = None) -> str:
test_run_name = f'TestRun_{datetime.today().strftime("%Y-%m-%dT%H:%M:%S")}' if \
not test_run_name else test_run_name
Expand All @@ -73,6 +74,7 @@ def create_test_run(self, test_run_name: str = None) -> str:

return Converter.get_id_from_create_test_run_response(response)

@retry
def get_test_run(self, test_run_id: str) -> TestRunV2ApiResult:
"""Function gets test run and returns test run."""
logging.debug(f"Getting test run by id {test_run_id}")
Expand All @@ -85,6 +87,7 @@ def get_test_run(self, test_run_id: str) -> TestRunV2ApiResult:
logging.error(f"Test run by id {test_run_id} not found!")
raise Exception(f"Test run by id {test_run_id} not found!")

@retry
def update_test_run(self, test_run: TestRunV2ApiResult) -> None:
"""Function updates test run."""
model = Converter.build_update_empty_request(test_run)
Expand All @@ -111,6 +114,7 @@ def get_external_ids_for_test_run_id(self) -> List[str]:
raise Exception('The autotests with the status "InProgress" ' +
f'and the configuration id "{self.__config.get_configuration_id()}" were not found!')

@retry
def __get_test_results(self) -> List[TestResultShortResponse]:
all_test_results = []
skip = 0
Expand Down Expand Up @@ -138,6 +142,7 @@ def __get_test_results(self) -> List[TestResultShortResponse]:
return all_test_results

@adapter_logger
@retry
def __get_autotests_by_external_id(self, external_id: str) -> List[AutoTestApiResult]:
model = Converter.project_id_and_external_id_to_auto_tests_search_post_request(
self.__config.get_project_id(),
Expand Down Expand Up @@ -281,6 +286,7 @@ def __get_work_item_uuid_by_work_item_id(self, work_item_id: str) -> str or None
logging.error(f'Getting workitem by id {work_item_id} status: {exc}')

@adapter_logger
@retry
def __get_work_items_linked_to_autotest(self, autotest_global_id: str) -> List[WorkItemIdentifierModel]:
return self.__autotest_api.get_work_items_linked_to_auto_test(id=autotest_global_id)

Expand All @@ -303,6 +309,7 @@ def __update_autotest_link_from_work_items(self, autotest_global_id: str, work_i
self.__link_test_to_work_item(autotest_global_id, work_item_id)

@adapter_logger
@retry
def __create_test(self, test_result: TestResult) -> str:
logging.debug(f'Autotest "{test_result.get_autotest_name()}" was not found')

Expand All @@ -321,6 +328,7 @@ def __create_test(self, test_result: TestResult) -> str:
return autotest_response.id

@adapter_logger
@retry
def __create_tests(self, autotests_for_create: List[AutoTestPostModel]) -> None:
logging.debug(f'Creating autotests: "{autotests_for_create}')

Expand All @@ -329,6 +337,7 @@ def __create_tests(self, autotests_for_create: List[AutoTestPostModel]) -> None:
logging.debug(f'Autotests were created')

@adapter_logger
@retry
def __update_test(self, test_result: TestResult, autotest: AutoTestApiResult) -> None:
logging.debug(f'Autotest "{test_result.get_autotest_name()}" was found')

Expand All @@ -342,6 +351,7 @@ def __update_test(self, test_result: TestResult, autotest: AutoTestApiResult) ->
logging.debug(f'Autotest "{test_result.get_autotest_name()}" was updated')

@adapter_logger
@retry
def __update_tests(self, autotests_for_update: List[AutoTestPutModel]) -> None:
logging.debug(f'Updating autotests: {autotests_for_update}')

Expand All @@ -368,6 +378,7 @@ def __link_test_to_work_item(self, autotest_global_id: str, work_item_id: str) -
logging.debug(f'Autotest was linked with workItem "{work_item_id}" by global id "{autotest_global_id}')

@adapter_logger
@retry
def __load_test_result(self, test_result: TestResult) -> str:
model = Converter.test_result_to_testrun_result_post_model(
test_result,
Expand All @@ -383,6 +394,7 @@ def __load_test_result(self, test_result: TestResult) -> str:
return Converter.get_test_result_id_from_testrun_result_post_response(response)

@adapter_logger
@retry
def get_test_result_by_id(self, test_result_id: str) -> TestResultResponse:
return self.__test_results_api.api_v2_test_results_id_get(id=test_result_id)

Expand Down