qase-python-commons 5.0.1__tar.gz → 5.0.2__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.
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/PKG-INFO +1 -1
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/pyproject.toml +1 -1
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/run.py +3 -3
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/report.py +57 -1
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/PKG-INFO +1 -1
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/README.md +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/setup.cfg +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/__init__.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/__init__.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/client/api_v1_client.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/client/api_v2_client.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/client/base_api_client.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/config.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/exceptions/reporter.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/loader.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/logger.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/__init__.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/attachment.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/basemodel.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/api.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/batch.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/connection.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/framework.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/plan.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/qaseconfig.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/report.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/run.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/testops.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/external_link.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/relation.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/result.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/runtime.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/step.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/__init__.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/db.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/network.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/sleep.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/__init__.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/core.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/testops.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/testops_multi.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/status_mapping/__init__.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/status_mapping/status_mapping.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/util/__init__.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/util/host_data.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/utils.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/validators/base.py +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/SOURCES.txt +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/dependency_links.txt +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/requires.txt +0 -0
- {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qase-python-commons
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.2
|
|
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
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qase-python-commons"
|
|
7
|
-
version = "5.0.
|
|
7
|
+
version = "5.0.2"
|
|
8
8
|
description = "A library for Qase TestOps and Qase Report"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{name = "Qase Team", email = "support@qase.io"}]
|
|
@@ -23,7 +23,7 @@ class RunStats(BaseModel):
|
|
|
23
23
|
self.passed = 0
|
|
24
24
|
self.failed = 0
|
|
25
25
|
self.skipped = 0
|
|
26
|
-
self.
|
|
26
|
+
self.blocked = 0
|
|
27
27
|
self.invalid = 0
|
|
28
28
|
self.muted = 0
|
|
29
29
|
self.total = 0
|
|
@@ -36,8 +36,8 @@ class RunStats(BaseModel):
|
|
|
36
36
|
self.failed += 1
|
|
37
37
|
elif status == "skipped":
|
|
38
38
|
self.skipped += 1
|
|
39
|
-
elif status == "
|
|
40
|
-
self.
|
|
39
|
+
elif status == "blocked":
|
|
40
|
+
self.blocked += 1
|
|
41
41
|
elif status == "invalid":
|
|
42
42
|
self.invalid += 1
|
|
43
43
|
self.total += 1
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/report.py
RENAMED
|
@@ -4,11 +4,63 @@ import shutil
|
|
|
4
4
|
import json
|
|
5
5
|
import re
|
|
6
6
|
from ..models import Result, Run, Attachment
|
|
7
|
+
from ..models.step import Step, StepType, StepTextData
|
|
7
8
|
from .. import QaseUtils, Logger
|
|
8
9
|
from ..models.config.connection import Format
|
|
9
10
|
from ..models.config.qaseconfig import QaseConfig
|
|
10
11
|
|
|
11
12
|
|
|
13
|
+
def _convert_step_data_to_text(step: Step) -> None:
|
|
14
|
+
"""Convert step data to TEXT format for report serialization."""
|
|
15
|
+
if step.data is None:
|
|
16
|
+
return
|
|
17
|
+
|
|
18
|
+
step_type = step.step_type
|
|
19
|
+
data = step.data
|
|
20
|
+
|
|
21
|
+
if step_type == StepType.TEXT:
|
|
22
|
+
# Already in TEXT format, no conversion needed
|
|
23
|
+
pass
|
|
24
|
+
elif step_type == StepType.ASSERT:
|
|
25
|
+
step.data = StepTextData(
|
|
26
|
+
action=f"Assert: {data.message}",
|
|
27
|
+
expected_result=str(data.expected)
|
|
28
|
+
)
|
|
29
|
+
step.data.input_data = str(data.actual)
|
|
30
|
+
elif step_type == StepType.GHERKIN:
|
|
31
|
+
step.data = StepTextData(
|
|
32
|
+
action=f"{data.keyword} {data.name}",
|
|
33
|
+
expected_result=None
|
|
34
|
+
)
|
|
35
|
+
step.data.input_data = data.data
|
|
36
|
+
elif step_type == StepType.REQUEST:
|
|
37
|
+
step.data = StepTextData(
|
|
38
|
+
action=f"{data.request_method} {data.request_url}",
|
|
39
|
+
expected_result=f"Status: {data.status_code}" if data.status_code else None
|
|
40
|
+
)
|
|
41
|
+
step.data.input_data = data.request_body
|
|
42
|
+
elif step_type == StepType.DB_QUERY:
|
|
43
|
+
step.data = StepTextData(
|
|
44
|
+
action=f"SQL: {data.query}",
|
|
45
|
+
expected_result=data.expected_result
|
|
46
|
+
)
|
|
47
|
+
step.data.input_data = data.connection_info
|
|
48
|
+
elif step_type == StepType.SLEEP:
|
|
49
|
+
step.data = StepTextData(
|
|
50
|
+
action=f"Sleep {data.duration}ms",
|
|
51
|
+
expected_result=None
|
|
52
|
+
)
|
|
53
|
+
step.data.input_data = None
|
|
54
|
+
|
|
55
|
+
# Set step_type to TEXT after conversion
|
|
56
|
+
step.step_type = StepType.TEXT
|
|
57
|
+
|
|
58
|
+
# Recursively convert nested steps
|
|
59
|
+
if step.steps:
|
|
60
|
+
for nested_step in step.steps:
|
|
61
|
+
_convert_step_data_to_text(nested_step)
|
|
62
|
+
|
|
63
|
+
|
|
12
64
|
class QaseReport:
|
|
13
65
|
def __init__(
|
|
14
66
|
self,
|
|
@@ -91,6 +143,10 @@ class QaseReport:
|
|
|
91
143
|
|
|
92
144
|
# Method saves result to a file
|
|
93
145
|
def _store_result(self, result: Result):
|
|
146
|
+
# Convert all step data to TEXT format for report
|
|
147
|
+
if result.steps:
|
|
148
|
+
for step in result.steps:
|
|
149
|
+
_convert_step_data_to_text(step)
|
|
94
150
|
self._store_object(result, self.report_path + "/results/", result.id)
|
|
95
151
|
|
|
96
152
|
def _check_report_path(self):
|
|
@@ -121,7 +177,7 @@ class QaseReport:
|
|
|
121
177
|
|
|
122
178
|
run.add_host_data(QaseUtils.get_host_data())
|
|
123
179
|
|
|
124
|
-
self._store_object(run, self.report_path, "
|
|
180
|
+
self._store_object(run, self.report_path, "run")
|
|
125
181
|
|
|
126
182
|
# Saves a model to a file
|
|
127
183
|
def _store_object(self, object, path, filename):
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qase-python-commons
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.2
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/client/api_v1_client.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/client/api_v2_client.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/client/base_api_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/exceptions/reporter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/attachment.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/basemodel.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/api.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/batch.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/connection.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/framework.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/plan.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/qaseconfig.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/report.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/run.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/testops.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/external_link.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/testops.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/testops_multi.py
RENAMED
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/status_mapping/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|