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.
Files changed (51) hide show
  1. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/PKG-INFO +1 -1
  2. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/pyproject.toml +1 -1
  3. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/run.py +3 -3
  4. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/report.py +57 -1
  5. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/PKG-INFO +1 -1
  6. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/README.md +0 -0
  7. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/setup.cfg +0 -0
  8. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/__init__.py +0 -0
  9. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/__init__.py +0 -0
  10. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/client/api_v1_client.py +0 -0
  11. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/client/api_v2_client.py +0 -0
  12. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/client/base_api_client.py +0 -0
  13. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/config.py +0 -0
  14. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/exceptions/reporter.py +0 -0
  15. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/loader.py +0 -0
  16. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/logger.py +0 -0
  17. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/__init__.py +0 -0
  18. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/attachment.py +0 -0
  19. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/basemodel.py +0 -0
  20. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/api.py +0 -0
  21. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/batch.py +0 -0
  22. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/connection.py +0 -0
  23. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/framework.py +0 -0
  24. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/plan.py +0 -0
  25. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/qaseconfig.py +0 -0
  26. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/report.py +0 -0
  27. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/run.py +0 -0
  28. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/config/testops.py +0 -0
  29. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/external_link.py +0 -0
  30. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/relation.py +0 -0
  31. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/result.py +0 -0
  32. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/runtime.py +0 -0
  33. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/models/step.py +0 -0
  34. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/__init__.py +0 -0
  35. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/db.py +0 -0
  36. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/network.py +0 -0
  37. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/profilers/sleep.py +0 -0
  38. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/__init__.py +0 -0
  39. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/core.py +0 -0
  40. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/testops.py +0 -0
  41. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/reporters/testops_multi.py +0 -0
  42. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/status_mapping/__init__.py +0 -0
  43. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/status_mapping/status_mapping.py +0 -0
  44. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/util/__init__.py +0 -0
  45. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/util/host_data.py +0 -0
  46. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/utils.py +0 -0
  47. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase/commons/validators/base.py +0 -0
  48. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/SOURCES.txt +0 -0
  49. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/dependency_links.txt +0 -0
  50. {qase_python_commons-5.0.1 → qase_python_commons-5.0.2}/src/qase_python_commons.egg-info/requires.txt +0 -0
  51. {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.1
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.1"
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.broken = 0
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 == "broken":
40
- self.broken += 1
39
+ elif status == "blocked":
40
+ self.blocked += 1
41
41
  elif status == "invalid":
42
42
  self.invalid += 1
43
43
  self.total += 1
@@ -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, "report")
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):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qase-python-commons
3
- Version: 5.0.1
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