qase-python-commons 3.4.2__py3-none-any.whl → 3.4.4__py3-none-any.whl
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.
Potentially problematic release.
This version of qase-python-commons might be problematic. Click here for more details.
- qase/commons/client/api_v1_client.py +1 -1
- qase/commons/client/api_v2_client.py +10 -4
- qase/commons/client/base_api_client.py +1 -1
- qase/commons/models/runtime.py +9 -0
- qase/commons/reporters/core.py +5 -3
- qase/commons/reporters/testops.py +2 -0
- {qase_python_commons-3.4.2.dist-info → qase_python_commons-3.4.4.dist-info}/METADATA +1 -1
- {qase_python_commons-3.4.2.dist-info → qase_python_commons-3.4.4.dist-info}/RECORD +10 -10
- {qase_python_commons-3.4.2.dist-info → qase_python_commons-3.4.4.dist-info}/WHEEL +1 -1
- {qase_python_commons-3.4.2.dist-info → qase_python_commons-3.4.4.dist-info}/top_level.txt +0 -0
|
@@ -66,7 +66,7 @@ class ApiV1Client(BaseApiClient):
|
|
|
66
66
|
self.logger.log("Exception when calling EnvironmentsApi->get_environments: %s\n" % e, "error")
|
|
67
67
|
raise ReporterException(e)
|
|
68
68
|
|
|
69
|
-
def complete_run(self, project_code: str, run_id:
|
|
69
|
+
def complete_run(self, project_code: str, run_id: int) -> None:
|
|
70
70
|
api_runs = RunsApi(self.client)
|
|
71
71
|
self.logger.log_debug(f"Completing run {run_id}")
|
|
72
72
|
res = api_runs.get_run(project_code, run_id).result
|
|
@@ -111,10 +111,16 @@ class ApiV2Client(ApiV1Client):
|
|
|
111
111
|
|
|
112
112
|
try:
|
|
113
113
|
prepared_step = {'execution': {}, 'data': {}, 'steps': []}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
if step.execution.status == 'untested':
|
|
115
|
+
prepared_step['execution']['status'] = ResultStepStatus('skipped')
|
|
116
|
+
prepared_step['execution']['duration'] = 0
|
|
117
|
+
prepared_step['execution']['start_time'] = None
|
|
118
|
+
prepared_step['execution']['end_time'] = None
|
|
119
|
+
else:
|
|
120
|
+
prepared_step['execution']['status'] = ResultStepStatus(step.execution.status)
|
|
121
|
+
prepared_step['execution']['duration'] = step.execution.duration
|
|
122
|
+
prepared_step['execution']['start_time'] = step.execution.start_time
|
|
123
|
+
prepared_step['execution']['end_time'] = step.execution.end_time
|
|
118
124
|
|
|
119
125
|
if step.step_type == StepType.TEXT:
|
|
120
126
|
prepared_step['data']['action'] = step.data.action
|
qase/commons/models/runtime.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from . import Result
|
|
1
2
|
from .step import Step
|
|
2
3
|
from .attachment import Attachment
|
|
3
4
|
|
|
@@ -42,6 +43,14 @@ class Runtime:
|
|
|
42
43
|
except Exception as e:
|
|
43
44
|
raise QaseRuntimeException(e)
|
|
44
45
|
|
|
46
|
+
|
|
47
|
+
def add_param(self, key: str, value: str):
|
|
48
|
+
"""
|
|
49
|
+
Add a parameter to the current result.
|
|
50
|
+
"""
|
|
51
|
+
if self.result is not None:
|
|
52
|
+
self.result.params[key] = value
|
|
53
|
+
|
|
45
54
|
def clear(self):
|
|
46
55
|
self.result = None
|
|
47
56
|
self.steps = {}
|
qase/commons/reporters/core.py
CHANGED
|
@@ -19,7 +19,8 @@ from ..util import get_host_info
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class QaseCoreReporter:
|
|
22
|
-
def __init__(self, config: ConfigManager, framework: Union[str, None] = None,
|
|
22
|
+
def __init__(self, config: ConfigManager, framework: Union[str, None] = None,
|
|
23
|
+
reporter_name: Union[str, None] = None):
|
|
23
24
|
config.validate_config()
|
|
24
25
|
self.config = config.config
|
|
25
26
|
self.logger = Logger(self.config.debug)
|
|
@@ -64,14 +65,15 @@ class QaseCoreReporter:
|
|
|
64
65
|
self.logger.log('Failed to start run, disabling reporting', 'info')
|
|
65
66
|
self.logger.log(e, 'error')
|
|
66
67
|
self.reporter = None
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
return None
|
|
67
71
|
|
|
68
72
|
def complete_run(self) -> None:
|
|
69
73
|
if self.reporter:
|
|
70
74
|
try:
|
|
71
75
|
ts = time.time()
|
|
72
|
-
self.logger.log_debug("Completing run")
|
|
73
76
|
self.reporter.complete_run()
|
|
74
|
-
self.logger.log_debug("Run completed")
|
|
75
77
|
self.overhead += time.time() - ts
|
|
76
78
|
self.logger.log(f"Overhead for Qase Report: {round(self.overhead * 1000)}ms", 'info')
|
|
77
79
|
except Exception as e:
|
|
@@ -120,7 +120,9 @@ class QaseTestOps:
|
|
|
120
120
|
if self.complete_after_run:
|
|
121
121
|
while self.count_running_threads > 0:
|
|
122
122
|
pass
|
|
123
|
+
self.logger.log_debug("Completing run")
|
|
123
124
|
self.client.complete_run(self.project_code, self.run_id)
|
|
125
|
+
self.logger.log_debug("Run completed")
|
|
124
126
|
|
|
125
127
|
def complete_worker(self) -> None:
|
|
126
128
|
if len(self.results) > 0:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qase-python-commons
|
|
3
|
-
Version: 3.4.
|
|
3
|
+
Version: 3.4.4
|
|
4
4
|
Summary: A library for Qase TestOps and Qase Report
|
|
5
5
|
Author-email: Qase Team <support@qase.io>
|
|
6
6
|
Project-URL: Homepage, https://github.com/qase-tms/qase-python/tree/main/qase-python-commons
|
|
@@ -3,9 +3,9 @@ qase/commons/config.py,sha256=n0tNGtOsJqaUDe_XBtKoAqgTlBf3AwVR8ddwTTf5N8o,9100
|
|
|
3
3
|
qase/commons/loader.py,sha256=-MMY4HgSI6q1xq3NaJoq_w4liM73qdFKjYLVCT1E7Pc,1064
|
|
4
4
|
qase/commons/logger.py,sha256=KEQr8G0eFZxlI3LJIaaNWOKD8o3NhKsZD06swXFn3FI,1313
|
|
5
5
|
qase/commons/utils.py,sha256=OOr6kQ5hPZEyHXwbwiTOTkonRxmmtkyZPPGqXQKp5vY,2799
|
|
6
|
-
qase/commons/client/api_v1_client.py,sha256=
|
|
7
|
-
qase/commons/client/api_v2_client.py,sha256=
|
|
8
|
-
qase/commons/client/base_api_client.py,sha256=
|
|
6
|
+
qase/commons/client/api_v1_client.py,sha256=_dbtl0sesWEfNPMHAMH43zjn4TTKa12jy7BrObkSPEM,6168
|
|
7
|
+
qase/commons/client/api_v2_client.py,sha256=hAEi2QfSzpc4D-1gDtP3sVc-DsY2zMKyDPFqnazTnBg,8910
|
|
8
|
+
qase/commons/client/base_api_client.py,sha256=qiK93rXXeLOmp6e3cgsLA4lmrV_rCL1BIi_xUeqFrDE,2613
|
|
9
9
|
qase/commons/exceptions/reporter.py,sha256=dP-Mwcq8HKBOjgu3YqhyULDmDGU09BmT6Fh9HjICaUc,45
|
|
10
10
|
qase/commons/models/__init__.py,sha256=FTt5dYASBX4r6-tQi-_JAUVx4uvJs9GTxROdAZEV6Jo,272
|
|
11
11
|
qase/commons/models/attachment.py,sha256=Rjq1mAP11uk7TN2RrtImntw6DUMV7U0R-44TYj8O5j0,1432
|
|
@@ -13,7 +13,7 @@ qase/commons/models/basemodel.py,sha256=0j8E-LE6hxAKQPYLNM9qThor9s2ZndZys_kibeoL
|
|
|
13
13
|
qase/commons/models/relation.py,sha256=HymHeh1uBcoQnTs4Vra7WJ_KFkhryj5o7cShjoGQImI,511
|
|
14
14
|
qase/commons/models/result.py,sha256=Lw7KIe16BOfPG0zJdg-_JGvnaN8tXPczFC49DCn9YSA,3773
|
|
15
15
|
qase/commons/models/run.py,sha256=nU_FX_YKqJWSyM6QfJpPjhDO-DMz_JXcEVyJ8AzMJN4,3007
|
|
16
|
-
qase/commons/models/runtime.py,sha256=
|
|
16
|
+
qase/commons/models/runtime.py,sha256=h0kJcPYRo8dglIQVFyzh-cFpWb3bAaQaIq5wV8VfClM,1508
|
|
17
17
|
qase/commons/models/step.py,sha256=gEvqbs1kZB5NIqm6vzNuOXlJXFdTiSlANuM_0lbssL0,4417
|
|
18
18
|
qase/commons/models/config/api.py,sha256=IyYY2f3ncESUAEGvkE3-meatebBFJdvgo7KNOQnxLE0,288
|
|
19
19
|
qase/commons/models/config/batch.py,sha256=X0H8SVOCCD2pV6LSMqjI-tIjRcLifnrM5MareK2FhQw,321
|
|
@@ -29,13 +29,13 @@ qase/commons/profilers/db.py,sha256=Am1tvvLgJq4_A8JsuSeBGf47BD2lnSX-5KiMjSgr-Ko,
|
|
|
29
29
|
qase/commons/profilers/network.py,sha256=zKNBnTQG4BMg8dn8O--tQzQLpu-qs5ADhHEnqIas0gM,4950
|
|
30
30
|
qase/commons/profilers/sleep.py,sha256=HT6h0R-2XHZAoBYRxS2T_KC8RrnEoVjP7MXusaE4Nec,1624
|
|
31
31
|
qase/commons/reporters/__init__.py,sha256=J0aNLzb_MPPT_zF8BtX_w9nj_U7Ad06RGpyWK5Pxq1o,169
|
|
32
|
-
qase/commons/reporters/core.py,sha256=
|
|
32
|
+
qase/commons/reporters/core.py,sha256=JyFMGhcDOr3nBlhh0Ca8Dx6BmvNBoG8m1Y4hpC0qIog,8185
|
|
33
33
|
qase/commons/reporters/report.py,sha256=ZLwtVn5gjwgJFtfbpLUO-vW3M3skEq3AhKJwtmM0nUw,4810
|
|
34
|
-
qase/commons/reporters/testops.py,sha256=
|
|
34
|
+
qase/commons/reporters/testops.py,sha256=QEcpJhRqXTn4H_EcTt6vG_jqRgw6DGmgS2ZmysZJZdc,6303
|
|
35
35
|
qase/commons/util/__init__.py,sha256=0sRRfrMOIPCHpk9tXM94Pj10qrk18B61qEcbLpRjw_I,74
|
|
36
36
|
qase/commons/util/host_data.py,sha256=n8o5PDs8kELCZZ5GR7Jug6LsgZHWJudU7iRmZHRdrlw,5264
|
|
37
37
|
qase/commons/validators/base.py,sha256=wwSn-4YiuXtfGMGnSKgo9Vm5hAKevVmmfd2Ro6Q7MYQ,173
|
|
38
|
-
qase_python_commons-3.4.
|
|
39
|
-
qase_python_commons-3.4.
|
|
40
|
-
qase_python_commons-3.4.
|
|
41
|
-
qase_python_commons-3.4.
|
|
38
|
+
qase_python_commons-3.4.4.dist-info/METADATA,sha256=bHkCm0QKW4F7NJA5lL-WqBuiPS_OTqx2uIWxGj43xi8,1857
|
|
39
|
+
qase_python_commons-3.4.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
40
|
+
qase_python_commons-3.4.4.dist-info/top_level.txt,sha256=Mn5aFk7H7Uia4s1NRDsvebu8vCrFy9nOuRIBfkIY5kQ,5
|
|
41
|
+
qase_python_commons-3.4.4.dist-info/RECORD,,
|
|
File without changes
|