testit-cli 2.2.1.post522__tar.gz → 2.3.0.post523__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/PKG-INFO +12 -11
  2. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/README.md +10 -9
  3. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/setup.py +2 -2
  4. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/apiclient.py +21 -21
  5. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/click_commands.py +10 -8
  6. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/converter.py +38 -81
  7. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/config.py +1 -0
  8. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/parser.py +5 -2
  9. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/PKG-INFO +12 -11
  10. testit_cli-2.3.0.post523/src/testit_cli.egg-info/requires.txt +4 -0
  11. testit_cli-2.2.1.post522/src/testit_cli.egg-info/requires.txt +0 -4
  12. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/LICENSE +0 -0
  13. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/setup.cfg +0 -0
  14. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/__init__.py +0 -0
  15. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/__main__.py +0 -0
  16. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/autotests_filter.py +0 -0
  17. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/dir_worker.py +0 -0
  18. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/file_worker.py +0 -0
  19. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/filter_factory.py +0 -0
  20. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/importer.py +0 -0
  21. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/logger.py +0 -0
  22. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/__init__.py +0 -0
  23. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/mode.py +0 -0
  24. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/status.py +0 -0
  25. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/testcase.py +0 -0
  26. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/testrun.py +0 -0
  27. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/service.py +0 -0
  28. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/service_factory.py +0 -0
  29. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli/validation.py +0 -0
  30. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/SOURCES.txt +0 -0
  31. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/dependency_links.txt +0 -0
  32. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/entry_points.txt +0 -0
  33. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/top_level.txt +0 -0
  34. {testit_cli-2.2.1.post522 → testit_cli-2.3.0.post523}/tests/test_click.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: testit-cli
3
- Version: 2.2.1.post522
3
+ Version: 2.3.0.post523
4
4
  Summary: This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT
5
5
  Home-page: https://pypi.org/project/testit-cli/
6
6
  Author: Integration team
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- Requires-Dist: testit-api-client==5.1.2.post522
19
+ Requires-Dist: testit-api-client==5.0.0
20
20
  Requires-Dist: validators
21
21
  Requires-Dist: tqdm
22
22
  Requires-Dist: click~=8.0.4
@@ -41,12 +41,13 @@ You can see more information in [official documentation](https://docs.testit.sof
41
41
 
42
42
  ## Compatibility
43
43
 
44
- | Test IT | Test IT CLI |
45
- |---------|----------------|
46
- | 3.5+ | 0.1 |
47
- | 4.4 | 1.0 |
48
- | 4.5 | 1.2 |
49
- | 4.6 | 1.5 |
50
- | 5.0 | 2.0 |
51
- | 5.2 | 2.1 |
52
- | 5.2.2 | 2.2.1.post522 |
44
+ | Test IT | Test IT CLI |
45
+ |---------|---------------|
46
+ | 3.5+ | 0.1 |
47
+ | 4.4 | 1.0 |
48
+ | 4.5 | 1.2 |
49
+ | 4.6 | 1.5 |
50
+ | 5.0 | 2.0 |
51
+ | 5.2 | 2.1 |
52
+ | 5.2.2 | 2.2.1.post522 |
53
+ | 5.2.3 | 2.3.0.post523 |
@@ -9,12 +9,13 @@ You can see more information in [official documentation](https://docs.testit.sof
9
9
 
10
10
  ## Compatibility
11
11
 
12
- | Test IT | Test IT CLI |
13
- |---------|----------------|
14
- | 3.5+ | 0.1 |
15
- | 4.4 | 1.0 |
16
- | 4.5 | 1.2 |
17
- | 4.6 | 1.5 |
18
- | 5.0 | 2.0 |
19
- | 5.2 | 2.1 |
20
- | 5.2.2 | 2.2.1.post522 |
12
+ | Test IT | Test IT CLI |
13
+ |---------|---------------|
14
+ | 3.5+ | 0.1 |
15
+ | 4.4 | 1.0 |
16
+ | 4.5 | 1.2 |
17
+ | 4.6 | 1.5 |
18
+ | 5.0 | 2.0 |
19
+ | 5.2 | 2.1 |
20
+ | 5.2.2 | 2.2.1.post522 |
21
+ | 5.2.3 | 2.3.0.post523 |
@@ -1,6 +1,6 @@
1
1
  from setuptools import find_packages, setup
2
2
 
3
- VERSION = "2.2.1.post522"
3
+ VERSION = "2.3.0.post523"
4
4
 
5
5
  setup(
6
6
  name='testit-cli',
@@ -26,7 +26,7 @@ setup(
26
26
  py_modules=['testit_cli'],
27
27
  packages=find_packages(where='src'),
28
28
  package_dir={'': 'src'},
29
- install_requires=['testit-api-client==5.1.2.post522', 'validators', 'tqdm', 'click~=8.0.4'],
29
+ install_requires=['testit-api-client==5.0.0', 'validators', 'tqdm', 'click~=8.0.4'],
30
30
  entry_points={
31
31
  'console_scripts': [
32
32
  'testit = testit_cli.__main__:console_main'
@@ -3,11 +3,10 @@ import logging
3
3
  import os
4
4
  import typing
5
5
 
6
- from testit_api_client import ApiClient as TmsClient, CreateEmptyTestRunApiModel, TestResultShortResponse, \
7
- AutoTestApiResult, UpdateEmptyTestRunApiModel
6
+ from testit_api_client import ApiClient as TmsClient
8
7
  from testit_api_client import Configuration
9
8
  from testit_api_client.api import AttachmentsApi, AutoTestsApi, TestRunsApi, TestResultsApi
10
- from testit_api_client.models import AttachmentPutModel
9
+ from testit_api_client.models import AttachmentPutModel, TestRunV2PostShortModel, TestResultShortResponse
11
10
 
12
11
  from .converter import Converter
13
12
  from .models.testrun import TestRun
@@ -33,22 +32,22 @@ class ApiClient:
33
32
 
34
33
  def create_test_run(self, project_id: str, name: str) -> TestRun:
35
34
  """Function creates test run and returns test run id."""
36
- model = CreateEmptyTestRunApiModel(project_id=project_id, name=name)
35
+ model = TestRunV2PostShortModel(project_id=project_id, name=name)
37
36
  logging.debug(f"Creating test run with model: {model}")
38
37
 
39
- test_run = self.__test_run_api.create_empty(model)
38
+ test_run = self.__test_run_api.create_empty(test_run_v2_post_short_model=model)
40
39
 
41
40
  logging.info(f'Created new testrun (ID: {test_run.id})')
42
41
  logging.debug(f"Test run created: {test_run}")
43
42
 
44
- return Converter.test_run_v2_get_result_to_test_run(test_run)
43
+ return Converter.test_run_v2_get_model_to_test_run(test_run)
45
44
 
46
45
  def update_test_run(self, test_run: TestRun):
47
46
  """Function updates test run."""
48
- model: UpdateEmptyTestRunApiModel = Converter.test_run_to_update_empty_request(test_run)
47
+ model = Converter.test_run_to_update_empty_request(test_run)
49
48
  logging.debug(f"Updating test run with model: {model}")
50
49
 
51
- self.__test_run_api.update_empty(model)
50
+ self.__test_run_api.update_empty(test_run_v2_put_model=model)
52
51
 
53
52
  logging.info(f'Updated testrun (ID: {test_run.id})')
54
53
 
@@ -62,23 +61,22 @@ class ApiClient:
62
61
 
63
62
  logging.info(f"Completed testrun (ID: {test_run_id})")
64
63
 
65
- def get_test_run(self, test_run_id: str) -> Converter.test_run_v2_get_result_to_test_run:
64
+ def get_test_run(self, test_run_id: str) -> Converter.test_run_v2_get_model_to_test_run:
66
65
  """Function gets test run and returns test run."""
67
66
  logging.debug(f"Getting test run {test_run_id}")
68
67
 
69
68
  test_run = self.__test_run_api.get_test_run_by_id(test_run_id)
70
69
  if test_run is not None:
71
70
  logging.debug(f"Got testrun (ID: {test_run_id})")
72
- return Converter.test_run_v2_get_result_to_test_run(test_run)
71
+ return Converter.test_run_v2_get_model_to_test_run(test_run)
73
72
 
74
73
  logging.error(f"Test run {test_run_id} not found!")
75
74
 
76
- def get_autotests(self, model: Converter.project_id_and_external_id_to_autotests_search_post_request)\
77
- -> list[AutoTestApiResult]:
75
+ def get_autotests(self, model: Converter.project_id_and_external_id_to_autotests_search_post_request):
78
76
  """Function returns list of AutoTestModel."""
79
77
  logging.debug(f"Getting autotests: {model}")
80
78
 
81
- autotests: list[AutoTestApiResult] = self.__autotest_api.api_v2_auto_tests_search_post(auto_test_search_api_model=model)
79
+ autotests = self.__autotest_api.api_v2_auto_tests_search_post(autotests_select_model=model)
82
80
 
83
81
  logging.debug(f"Got autotests: {autotests}")
84
82
 
@@ -88,7 +86,7 @@ class ApiClient:
88
86
  """Function creates autotest and returns autotest id."""
89
87
  logging.debug(f"Creating autotest {model}")
90
88
 
91
- response = self.__autotest_api.create_auto_test(model)
89
+ response = self.__autotest_api.create_auto_test(auto_test_post_model=model)
92
90
 
93
91
  logging.debug(f"Created autotest {response}")
94
92
 
@@ -99,7 +97,7 @@ class ApiClient:
99
97
  try:
100
98
  logging.debug(f"Updating autotest {model}")
101
99
 
102
- self.__autotest_api.update_auto_test(model)
100
+ self.__autotest_api.update_auto_test(auto_test_put_model=model)
103
101
 
104
102
  logging.debug(f'Updated "{model.name}" successfully!')
105
103
  except Exception as exc:
@@ -113,7 +111,7 @@ class ApiClient:
113
111
  logging.debug(f"Adding autotest results to testrun {testrun_id}: {model}")
114
112
 
115
113
  self.__test_run_api.set_auto_test_results_for_test_run(
116
- testrun_id, [model]
114
+ id=testrun_id, auto_test_results_for_test_run_model=[model]
117
115
  )
118
116
  logging.debug(
119
117
  f"Added autotest results to testrun {testrun_id} successfully"
@@ -129,7 +127,8 @@ class ApiClient:
129
127
  if os.path.isfile(attachment):
130
128
  with open(attachment, "rb+") as file:
131
129
  try:
132
- attachment_response = self.__attachments_api.api_v2_attachments_post((file.name, file.read()))
130
+ attachment_response = self.__attachments_api.api_v2_attachments_post(
131
+ file=(file.name, file.read()))
133
132
 
134
133
  attachment_ids.append(AttachmentPutModel(id=attachment_response.id))
135
134
 
@@ -143,12 +142,13 @@ class ApiClient:
143
142
 
144
143
  def get_test_results(
145
144
  self,
146
- model: Converter.testrun_id_and_configuration_id_and_in_progress_outcome_to_test_results_search_post_request) \
147
- -> list[TestResultShortResponse]:
148
- """Function returns list of TestResultShortResponse."""
145
+ model: Converter.testrun_id_and_configuration_id_and_in_progress_outcome_to_test_results_search_post_request
146
+ ) -> typing.List[TestResultShortResponse]:
147
+ """Function returns list of TestResultShortGetModel."""
149
148
  logging.debug(f"Getting test results: {model}")
150
149
 
151
- test_results = self.__test_results_api.api_v2_test_results_search_post(model)
150
+ test_results = self.__test_results_api.api_v2_test_results_search_post(
151
+ test_results_filter_request=model)
152
152
 
153
153
  logging.debug(f"Got test results: {test_results}")
154
154
 
@@ -73,9 +73,10 @@ class ExtraArgsForOption(click.Option):
73
73
  @click.option("-a", "--attachments", multiple=True, type=list, help="Path to attachments for test run (multiple)", default=[], cls=ExtraArgsForOption)
74
74
  @click.option("-d", "--debug", is_flag=True, help="Set debug logs")
75
75
  @click.option("-dcv", "--disable-cert-validation", is_flag=True, help="Disables certificate validation")
76
- def upload_results(url, token, configuration_id, testrun_id, separator, namespace, classname, results, debug, attachments, disable_cert_validation):
76
+ @click.option("-iff", "--ignore-flaky-failure", is_flag=True, help="Ignore status flakyFailure in results")
77
+ def upload_results(url, token, configuration_id, testrun_id, separator, namespace, classname, results, debug, attachments, disable_cert_validation, ignore_flaky_failure):
77
78
  """Uploading results from different streams"""
78
- config = Config(url, token, "", configuration_id, testrun_id, "", separator, namespace, classname, list(chain.from_iterable(results)), debug, "", list(chain.from_iterable(attachments)), disable_cert_validation, "")
79
+ config = Config(url, token, "", configuration_id, testrun_id, "", separator, namespace, classname, list(chain.from_iterable(results)), debug, "", list(chain.from_iterable(attachments)), disable_cert_validation, "", ignore_flaky_failure)
79
80
  service = ServiceFactory().get(config)
80
81
 
81
82
  service.upload_results()
@@ -95,12 +96,13 @@ def upload_results(url, token, configuration_id, testrun_id, separator, namespac
95
96
  @click.option("-a", "--attachments", multiple=True, type=list, help="Path to attachments for test run (multiple)", default=[], cls=ExtraArgsForOption)
96
97
  @click.option("-d", "--debug", is_flag=True, help="Set debug logs")
97
98
  @click.option("-dcv", "--disable-cert-validation", is_flag=True, help="Disables certificate validation")
98
- def import_results(url, token, project_id, configuration_id, testrun_id, testrun_name, separator, namespace, classname, results, debug, attachments, disable_cert_validation):
99
+ @click.option("-iff", "--ignore-flaky-failure", is_flag=True, help="Ignore status flakyFailure in results")
100
+ def import_results(url, token, project_id, configuration_id, testrun_id, testrun_name, separator, namespace, classname, results, debug, attachments, disable_cert_validation, ignore_flaky_failure):
99
101
  """Uploading the first test results"""
100
102
  if testrun_id is not None and testrun_name is not None:
101
103
  click.echo("Illegal usage: `{}` are mutually exclusive arguments.".format(', '.join(["--testrun-id", "--testrun-name"])), err=True)
102
104
 
103
- config = Config(url, token, project_id, configuration_id, testrun_id, testrun_name, separator, namespace, classname, list(chain.from_iterable(results)), debug, "", list(chain.from_iterable(attachments)), disable_cert_validation, "")
105
+ config = Config(url, token, project_id, configuration_id, testrun_id, testrun_name, separator, namespace, classname, list(chain.from_iterable(results)), debug, "", list(chain.from_iterable(attachments)), disable_cert_validation, "", ignore_flaky_failure)
104
106
  service = ServiceFactory().get(config)
105
107
 
106
108
  service.import_results()
@@ -123,7 +125,7 @@ def testrun():
123
125
  @click.option("-dcv", "--disable-cert-validation", is_flag=True, help="Disables certificate validation")
124
126
  def create_test_run(url, token, project_id, testrun_name, output, debug, attachments, disable_cert_validation):
125
127
  """Creating a new test run"""
126
- config = Config(url, token, project_id, "", "", testrun_name, "", "", "", [], debug, output, list(chain.from_iterable(attachments)), disable_cert_validation, "")
128
+ config = Config(url, token, project_id, "", "", testrun_name, "", "", "", [], debug, output, list(chain.from_iterable(attachments)), disable_cert_validation, "", False)
127
129
  service = ServiceFactory().get(config)
128
130
 
129
131
  service.create_test_run()
@@ -138,7 +140,7 @@ def create_test_run(url, token, project_id, testrun_name, output, debug, attachm
138
140
  @click.option("-dcv", "--disable-cert-validation", is_flag=True, help="Disables certificate validation")
139
141
  def complete_test_run(url, token, testrun_id, debug, attachments, disable_cert_validation):
140
142
  """Completing the test run"""
141
- config = Config(url, token, "", "", testrun_id, "", "", "", "", [], debug, "", list(chain.from_iterable(attachments)), disable_cert_validation, "")
143
+ config = Config(url, token, "", "", testrun_id, "", "", "", "", [], debug, "", list(chain.from_iterable(attachments)), disable_cert_validation, "", False)
142
144
  service = ServiceFactory().get(config)
143
145
 
144
146
  service.finished_test_run()
@@ -153,7 +155,7 @@ def complete_test_run(url, token, testrun_id, debug, attachments, disable_cert_v
153
155
  @click.option("-dcv", "--disable-cert-validation", is_flag=True, help="Disables certificate validation")
154
156
  def upload_attachments_for_test_run(url, token, testrun_id, debug, attachments, disable_cert_validation):
155
157
  """Uploading attachments for the test run"""
156
- config = Config(url, token, "", "", testrun_id, "", "", "", "", [], debug, "", list(chain.from_iterable(attachments)), disable_cert_validation, "")
158
+ config = Config(url, token, "", "", testrun_id, "", "", "", "", [], debug, "", list(chain.from_iterable(attachments)), disable_cert_validation, "", False)
157
159
  service = ServiceFactory().get(config)
158
160
 
159
161
  service.upload_attachments_for_test_run()
@@ -177,7 +179,7 @@ GOLANG_FRAMEWORKS = ['golang']
177
179
  @click.option("-dcv", "--disable-cert-validation", is_flag=True, help="Disables certificate validation")
178
180
  def create_filter_for_framework(url, token, configuration_id, testrun_id, framework, debug, output, disable_cert_validation):
179
181
  """Creating filter by autotests for test frameworks"""
180
- config = Config(url, token, "", configuration_id, testrun_id, "", "", "", "", [], debug, output, [], disable_cert_validation, framework)
182
+ config = Config(url, token, "", configuration_id, testrun_id, "", "", "", "", [], debug, output, [], disable_cert_validation, framework, False)
181
183
  service = ServiceFactory().get(config)
182
184
 
183
185
  service.create_filter_for_test_framework()
@@ -1,16 +1,19 @@
1
1
  import typing
2
2
 
3
- from testit_api_client import AutoTestSearchApiModel, AutoTestFilterApiModel, AutoTestSearchIncludeApiModel, \
4
- TestResultsFilterApiModel, TestRunV2ApiResult, AttachmentApiResult, LinkApiResult, UpdateEmptyTestRunApiModel, \
5
- AssignAttachmentApiModel
6
3
  from testit_api_client.models import (
4
+ AutotestFilterModel,
5
+ SearchAutoTestsQueryIncludesModel,
7
6
  AutoTestResultsForTestRunModel,
7
+ AutotestsSelectModel,
8
8
  AttachmentModel,
9
9
  AttachmentPutModel,
10
10
  AutoTestPostModel,
11
11
  AutoTestPutModel,
12
12
  LinkModel,
13
13
  LinkPutModel,
14
+ TestRunV2GetModel,
15
+ TestRunV2PutModel,
16
+ TestResultsFilterRequest,
14
17
  TestResultOutcome,
15
18
  TestResultShortResponse,
16
19
  AutoTestModel
@@ -21,43 +24,43 @@ from .models.testrun import TestRun
21
24
 
22
25
  class Converter:
23
26
  @staticmethod
24
- def project_id_and_external_id_to_autotests_search_post_request(project_id: str, external_id: str) \
25
- -> AutoTestSearchApiModel:
26
- autotests_filter = AutoTestFilterApiModel(
27
+ def project_id_and_external_id_to_autotests_search_post_request(
28
+ project_id: str, external_id: str) -> AutotestsSelectModel:
29
+ autotests_filter = AutotestFilterModel(
27
30
  project_ids=[project_id],
28
31
  external_ids=[external_id],
29
32
  is_deleted=False)
30
- autotests_includes = AutoTestSearchIncludeApiModel(
33
+ autotests_includes = SearchAutoTestsQueryIncludesModel(
31
34
  include_steps=False,
32
35
  include_links=False,
33
36
  include_labels=False)
34
37
 
35
- return AutoTestSearchApiModel(filter=autotests_filter, includes=autotests_includes)
38
+ return AutotestsSelectModel(filter=autotests_filter, includes=autotests_includes)
36
39
 
37
40
  @staticmethod
38
- def autotest_ids_to_autotests_search_post_request(autotest_ids: typing.List[int]) \
39
- -> AutoTestSearchApiModel:
40
- autotests_filter = AutoTestFilterApiModel(
41
+ def autotest_ids_to_autotests_search_post_request(
42
+ autotest_ids: typing.List[int]) -> AutotestsSelectModel:
43
+ autotests_filter = AutotestFilterModel(
41
44
  global_ids=autotest_ids)
42
- autotests_includes = AutoTestSearchIncludeApiModel(
45
+ autotests_includes = SearchAutoTestsQueryIncludesModel(
43
46
  include_steps=False,
44
47
  include_links=False,
45
48
  include_labels=False)
46
49
 
47
- return AutoTestSearchApiModel(filter=autotests_filter, includes=autotests_includes)
50
+ return AutotestsSelectModel(filter=autotests_filter, includes=autotests_includes)
48
51
 
49
52
  @staticmethod
50
53
  def testrun_id_and_configuration_id_and_in_progress_outcome_to_test_results_search_post_request(
51
54
  testrun_id: str,
52
- configuration_id: str) -> TestResultsFilterApiModel:
53
- return TestResultsFilterApiModel(
55
+ configuration_id: str) -> TestResultsFilterRequest:
56
+ return TestResultsFilterRequest(
54
57
  test_run_ids=[testrun_id],
55
58
  configuration_ids=[configuration_id],
56
59
  outcomes=[TestResultOutcome("InProgress")])
57
60
 
58
61
  @staticmethod
59
- def test_result_short_get_models_to_autotest_ids(test_results: typing.List[TestResultShortResponse]) \
60
- -> list[int]:
62
+ def test_result_short_get_models_to_autotest_ids(
63
+ test_results: typing.List[TestResultShortResponse]) -> typing.List[int]:
61
64
  autotest_ids = []
62
65
 
63
66
  for test_result in test_results:
@@ -66,8 +69,8 @@ class Converter:
66
69
  return autotest_ids
67
70
 
68
71
  @staticmethod
69
- def autotest_models_to_external_keys(autotests: typing.List[AutoTestModel]) \
70
- -> list[str]:
72
+ def autotest_models_to_external_keys(
73
+ autotests: typing.List[AutoTestModel]) -> typing.List[str]:
71
74
  external_keys = []
72
75
 
73
76
  for autotest in autotests:
@@ -81,8 +84,8 @@ class Converter:
81
84
  return external_keys
82
85
 
83
86
  @staticmethod
84
- def test_result_to_create_autotest_request(result, external_id: str, project_id: str) \
85
- -> AutoTestPostModel:
87
+ def test_result_to_create_autotest_request(
88
+ result, external_id: str, project_id: str) -> AutoTestPostModel:
86
89
  return AutoTestPostModel(
87
90
  external_id=external_id,
88
91
  project_id=project_id,
@@ -92,8 +95,8 @@ class Converter:
92
95
  )
93
96
 
94
97
  @staticmethod
95
- def test_result_to_update_autotest_request(result, external_id: str, project_id: str) \
96
- -> AutoTestPutModel:
98
+ def test_result_to_update_autotest_request(
99
+ result, external_id: str, project_id: str) -> AutoTestPutModel:
97
100
  return AutoTestPutModel(
98
101
  external_id=external_id,
99
102
  project_id=project_id,
@@ -117,16 +120,16 @@ class Converter:
117
120
  )
118
121
 
119
122
  @classmethod
120
- def test_run_v2_get_result_to_test_run(cls, test_run_result: TestRunV2ApiResult) -> TestRun:
123
+ def test_run_v2_get_model_to_test_run(cls, test_run_model: TestRunV2GetModel) -> TestRun:
121
124
  return TestRun(
122
- id=test_run_result.id,
123
- project_id=test_run_result.project_id,
124
- state=test_run_result.state_name.value,
125
- name=test_run_result.name,
126
- description=test_run_result.description,
127
- launch_source=test_run_result.launch_source,
128
- attachments=cls.attachment_results_to_attachment_put_models(test_run_result.attachments),
129
- links=cls.link_results_to_link_put_models(test_run_result.links)
125
+ id=test_run_model.id,
126
+ project_id=test_run_model.project_id,
127
+ state=test_run_model.state_name.value,
128
+ name=test_run_model.name,
129
+ description=test_run_model.description,
130
+ launch_source=test_run_model.launch_source,
131
+ attachments=cls.attachment_models_to_attachment_put_models(test_run_model.attachments),
132
+ links=cls.link_models_to_link_put_models(test_run_model.links)
130
133
  )
131
134
 
132
135
  @classmethod
@@ -141,26 +144,10 @@ class Converter:
141
144
 
142
145
  return attachment_put_models
143
146
 
144
- @classmethod
145
- def attachment_results_to_attachment_put_models(
146
- cls,
147
- attachment_results: typing.List[AttachmentApiResult]) -> typing.List[AttachmentPutModel]:
148
- attachment_put_models = []
149
-
150
- for attachment_result in attachment_results:
151
- attachment_put_models.append(
152
- cls.attachment_result_to_attachment_put_model(attachment_result))
153
-
154
- return attachment_put_models
155
-
156
147
  @staticmethod
157
148
  def attachment_model_to_attachment_put_model(attachment_model: AttachmentModel) -> AttachmentPutModel:
158
149
  return AttachmentPutModel(id=attachment_model.id)
159
150
 
160
- @staticmethod
161
- def attachment_result_to_attachment_put_model(attachment_result: AttachmentApiResult) -> AttachmentPutModel:
162
- return AttachmentPutModel(id=attachment_result.id)
163
-
164
151
  @classmethod
165
152
  def link_models_to_link_put_models(
166
153
  cls,
@@ -173,18 +160,6 @@ class Converter:
173
160
 
174
161
  return link_put_models
175
162
 
176
- @classmethod
177
- def link_results_to_link_put_models(
178
- cls,
179
- link_results: typing.List[LinkApiResult]) -> typing.List[LinkPutModel]:
180
- link_put_models = []
181
-
182
- for link_result in link_results:
183
- link_put_models.append(
184
- cls.link_result_to_link_put_model(link_result))
185
-
186
- return link_put_models
187
-
188
163
  @staticmethod
189
164
  def link_model_to_link_put_model(link_model: LinkModel) -> LinkPutModel:
190
165
  return LinkPutModel(
@@ -197,30 +172,12 @@ class Converter:
197
172
  )
198
173
 
199
174
  @staticmethod
200
- def link_result_to_link_put_model(link_result: LinkApiResult) -> LinkPutModel:
201
- return LinkPutModel(
202
- url=link_result.url,
203
- id=link_result.id,
204
- title=link_result.title,
205
- description=link_result.description,
206
- type=link_result.type,
207
- has_info=link_result.has_info
208
- )
209
-
210
- @staticmethod
211
- def test_run_to_update_empty_request(test_run: TestRun) -> UpdateEmptyTestRunApiModel:
212
- return UpdateEmptyTestRunApiModel(
175
+ def test_run_to_update_empty_request(test_run: TestRun) -> TestRunV2PutModel:
176
+ return TestRunV2PutModel(
213
177
  id=test_run.id,
214
178
  name=test_run.name,
215
179
  description=test_run.description,
216
180
  launch_source=test_run.launch_source,
217
- attachments=Converter.test_run_attachments_to(test_run.attachments),
181
+ attachments=test_run.attachments,
218
182
  links=test_run.links
219
183
  )
220
-
221
- @staticmethod
222
- def test_run_attachments_to(attachments: list[AttachmentPutModel]) -> list[AssignAttachmentApiModel]:
223
- def convert(x: AttachmentPutModel) -> AssignAttachmentApiModel:
224
- return AssignAttachmentApiModel(id=x.id, model_config=x.model_config)
225
-
226
- return [convert(x) for x in attachments]
@@ -18,3 +18,4 @@ class Config:
18
18
  paths_to_attachments: list
19
19
  disable_cert_validation: bool
20
20
  framework: str
21
+ ignore_flaky_failure: bool
@@ -8,12 +8,13 @@ from .file_worker import FileWorker
8
8
 
9
9
 
10
10
  class Parser:
11
+ __FLAKY_FAILURE_NODE_NAME = "flakyFailure"
11
12
  __FAILURE_NODE_NAMES = [
12
13
  "error",
13
14
  "failure",
14
15
  "rerunFailure",
15
16
  "rerunError",
16
- "flakyFailure",
17
+ __FLAKY_FAILURE_NODE_NAME,
17
18
  "flakyError",
18
19
  "system-err"]
19
20
  __MESSAGE_ATTRIBUTE_NAME = "message"
@@ -27,6 +28,7 @@ class Parser:
27
28
  self.__separator = config.separator
28
29
  self.__namespace = config.namespace
29
30
  self.__classname = config.classname
31
+ self.__ignore_flaky_failure = config.ignore_flaky_failure
30
32
 
31
33
  def read_file(self): # noqa: C901
32
34
  results = []
@@ -68,7 +70,8 @@ class Parser:
68
70
  testcase.set_status(Status.SKIPPED)
69
71
 
70
72
  continue
71
- elif child.nodeName in self.__FAILURE_NODE_NAMES:
73
+ elif child.nodeName in self.__FAILURE_NODE_NAMES and \
74
+ not (child.nodeName == self.__FLAKY_FAILURE_NODE_NAME and self.__ignore_flaky_failure):
72
75
  testcase.set_status(Status.FAILED)
73
76
 
74
77
  testcase.set_trace(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: testit-cli
3
- Version: 2.2.1.post522
3
+ Version: 2.3.0.post523
4
4
  Summary: This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT
5
5
  Home-page: https://pypi.org/project/testit-cli/
6
6
  Author: Integration team
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- Requires-Dist: testit-api-client==5.1.2.post522
19
+ Requires-Dist: testit-api-client==5.0.0
20
20
  Requires-Dist: validators
21
21
  Requires-Dist: tqdm
22
22
  Requires-Dist: click~=8.0.4
@@ -41,12 +41,13 @@ You can see more information in [official documentation](https://docs.testit.sof
41
41
 
42
42
  ## Compatibility
43
43
 
44
- | Test IT | Test IT CLI |
45
- |---------|----------------|
46
- | 3.5+ | 0.1 |
47
- | 4.4 | 1.0 |
48
- | 4.5 | 1.2 |
49
- | 4.6 | 1.5 |
50
- | 5.0 | 2.0 |
51
- | 5.2 | 2.1 |
52
- | 5.2.2 | 2.2.1.post522 |
44
+ | Test IT | Test IT CLI |
45
+ |---------|---------------|
46
+ | 3.5+ | 0.1 |
47
+ | 4.4 | 1.0 |
48
+ | 4.5 | 1.2 |
49
+ | 4.6 | 1.5 |
50
+ | 5.0 | 2.0 |
51
+ | 5.2 | 2.1 |
52
+ | 5.2.2 | 2.2.1.post522 |
53
+ | 5.2.3 | 2.3.0.post523 |
@@ -0,0 +1,4 @@
1
+ testit-api-client==5.0.0
2
+ validators
3
+ tqdm
4
+ click~=8.0.4
@@ -1,4 +0,0 @@
1
- testit-api-client==5.1.2.post522
2
- validators
3
- tqdm
4
- click~=8.0.4