qase-python-commons 3.1.0b3__py3-none-any.whl → 3.1.0b4__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/reporters/testops.py +22 -0
- {qase_python_commons-3.1.0b3.dist-info → qase_python_commons-3.1.0b4.dist-info}/METADATA +1 -1
- {qase_python_commons-3.1.0b3.dist-info → qase_python_commons-3.1.0b4.dist-info}/RECORD +5 -5
- {qase_python_commons-3.1.0b3.dist-info → qase_python_commons-3.1.0b4.dist-info}/WHEEL +1 -1
- {qase_python_commons-3.1.0b3.dist-info → qase_python_commons-3.1.0b4.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import threading
|
|
2
|
+
import urllib.parse
|
|
2
3
|
|
|
3
4
|
from datetime import datetime
|
|
4
5
|
from typing import List
|
|
@@ -17,6 +18,7 @@ class QaseTestOps:
|
|
|
17
18
|
def __init__(self, config: QaseConfig, logger: Logger) -> None:
|
|
18
19
|
self.config = config
|
|
19
20
|
self.logger = logger
|
|
21
|
+
self.__baseUrl = self.__get_host(config.testops.api.host)
|
|
20
22
|
|
|
21
23
|
self.client = self._prepare_client()
|
|
22
24
|
|
|
@@ -128,6 +130,8 @@ class QaseTestOps:
|
|
|
128
130
|
self._send_results()
|
|
129
131
|
|
|
130
132
|
def add_result(self, result: Result) -> None:
|
|
133
|
+
if result.get_status() == 'failed':
|
|
134
|
+
self.__show_link(result.testops_id, result.title)
|
|
131
135
|
self.results.append(result)
|
|
132
136
|
if len(self.results) >= self.batch_size:
|
|
133
137
|
self._send_results()
|
|
@@ -137,3 +141,21 @@ class QaseTestOps:
|
|
|
137
141
|
|
|
138
142
|
def set_results(self, results) -> None:
|
|
139
143
|
self.results = results
|
|
144
|
+
|
|
145
|
+
def __show_link(self, id, title: str):
|
|
146
|
+
link = self.__prepare_link(id, title)
|
|
147
|
+
self.logger.log(f"See why this test failed: {link}", "info")
|
|
148
|
+
|
|
149
|
+
def __prepare_link(self, id, title: str):
|
|
150
|
+
link = f"{self.__baseUrl}/run/{self.project_code}/dashboard/{self.run_id}?source=logs&status=%5B2%5D&search="
|
|
151
|
+
if id:
|
|
152
|
+
return f"{link}{id}`"
|
|
153
|
+
|
|
154
|
+
return f"{link}{urllib.parse.quote_plus(title)}"
|
|
155
|
+
|
|
156
|
+
@staticmethod
|
|
157
|
+
def __get_host(host: str):
|
|
158
|
+
if host == 'qase.io':
|
|
159
|
+
return 'https://app.qase.io'
|
|
160
|
+
|
|
161
|
+
return f'https://{host.replace("api", "app")}'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qase-python-commons
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.0b4
|
|
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/master/qase-python-commons
|
|
@@ -32,9 +32,9 @@ qase/commons/profilers/sleep.py,sha256=HT6h0R-2XHZAoBYRxS2T_KC8RrnEoVjP7MXusaE4N
|
|
|
32
32
|
qase/commons/reporters/__init__.py,sha256=J0aNLzb_MPPT_zF8BtX_w9nj_U7Ad06RGpyWK5Pxq1o,169
|
|
33
33
|
qase/commons/reporters/core.py,sha256=vrI9k3cSXqM24fhkyrZRYLJl92ADMh7CCUoH47egEIM,7916
|
|
34
34
|
qase/commons/reporters/report.py,sha256=MPsFv3k2l4652NyXEGFiSmwsSpwZT3Is-lLRXvsniz4,4606
|
|
35
|
-
qase/commons/reporters/testops.py,sha256=
|
|
35
|
+
qase/commons/reporters/testops.py,sha256=f5BcorFwIK5BSeA4Rv4IKDddkWrAXL_w-Y5Xn--NdYs,6264
|
|
36
36
|
qase/commons/validators/base.py,sha256=wwSn-4YiuXtfGMGnSKgo9Vm5hAKevVmmfd2Ro6Q7MYQ,173
|
|
37
|
-
qase_python_commons-3.1.
|
|
38
|
-
qase_python_commons-3.1.
|
|
39
|
-
qase_python_commons-3.1.
|
|
40
|
-
qase_python_commons-3.1.
|
|
37
|
+
qase_python_commons-3.1.0b4.dist-info/METADATA,sha256=29L8I2aeM4wbuvA3i35LkNigAt6FlMsfggO38aj5Qn4,1871
|
|
38
|
+
qase_python_commons-3.1.0b4.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
|
|
39
|
+
qase_python_commons-3.1.0b4.dist-info/top_level.txt,sha256=Mn5aFk7H7Uia4s1NRDsvebu8vCrFy9nOuRIBfkIY5kQ,5
|
|
40
|
+
qase_python_commons-3.1.0b4.dist-info/RECORD,,
|
{qase_python_commons-3.1.0b3.dist-info → qase_python_commons-3.1.0b4.dist-info}/top_level.txt
RENAMED
|
File without changes
|