qase-robotframework 3.2.1__tar.gz → 3.2.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 (18) hide show
  1. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/PKG-INFO +31 -7
  2. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/README.md +29 -5
  3. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/pyproject.toml +2 -2
  4. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase/robotframework/listener.py +6 -3
  5. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase/robotframework/models.py +2 -0
  6. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase/robotframework/tag_parser.py +13 -0
  7. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase_robotframework.egg-info/PKG-INFO +31 -7
  8. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase_robotframework.egg-info/requires.txt +1 -1
  9. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/LICENSE +0 -0
  10. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/setup.cfg +0 -0
  11. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase/robotframework/__init__.py +0 -0
  12. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase/robotframework/filter.py +0 -0
  13. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase/robotframework/method.py +0 -0
  14. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase/robotframework/plugin.py +0 -0
  15. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase/robotframework/types.py +0 -0
  16. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase_robotframework.egg-info/SOURCES.txt +0 -0
  17. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase_robotframework.egg-info/dependency_links.txt +0 -0
  18. {qase_robotframework-3.2.1 → qase_robotframework-3.2.2}/src/qase_robotframework.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qase-robotframework
3
- Version: 3.2.1
3
+ Version: 3.2.2
4
4
  Summary: Qase Robot Framework Plugin
5
5
  Author-email: Qase Team <support@qase.io>
6
6
  License: Apache License
@@ -212,7 +212,7 @@ Classifier: Programming Language :: Python
212
212
  Requires-Python: >=3.7
213
213
  Description-Content-Type: text/markdown
214
214
  License-File: LICENSE
215
- Requires-Dist: qase-python-commons~=3.2.0
215
+ Requires-Dist: qase-python-commons~=3.2.1
216
216
  Requires-Dist: filelock~=3.12.2
217
217
  Provides-Extra: testing
218
218
  Requires-Dist: pytest; extra == "testing"
@@ -249,7 +249,7 @@ Configuration options are described in the
249
249
 
250
250
  ```json
251
251
  {
252
- "mode": "testops",
252
+ "mode": "testops",
253
253
  "fallback": "report",
254
254
  "debug": true,
255
255
  "testops": {
@@ -265,12 +265,12 @@ Configuration options are described in the
265
265
  "size": 100
266
266
  }
267
267
  },
268
- "report": {
268
+ "report": {
269
269
  "driver": "local",
270
270
  "connection": {
271
271
  "local": {
272
272
  "path": "./build/qase-report",
273
- "format": "json"
273
+ "format": "json"
274
274
  }
275
275
  }
276
276
  },
@@ -278,12 +278,12 @@ Configuration options are described in the
278
278
  }
279
279
  ```
280
280
 
281
-
282
281
  ## Usage
283
282
 
284
283
  ### Link tests with test cases in Qase TestOps
285
284
 
286
- To link the automated tests with the test cases in Qase TestOps, use the tags in form like `Q-<case id without project code>`.
285
+ To link the automated tests with the test cases in Qase TestOps, use the tags in form like
286
+ `Q-<case id without project code>`.
287
287
  Example:
288
288
 
289
289
  ```robotframework
@@ -316,6 +316,7 @@ Subtraction 12 - 2 - 2 8
316
316
  Listener supports reporting steps results:
317
317
 
318
318
  Example:
319
+
319
320
  ```robotframework
320
321
  Quick Get A JSON Body Test ## Test case: "Quick Get A JSON Body Test"
321
322
  [Tags] Q-3
@@ -327,7 +328,30 @@ Initializing the test case ## T
327
328
  Set To Dictionary ${info} field1=A sample string ## 1-st step - "Set To Dictionary"
328
329
  ```
329
330
 
331
+ ### Working with parameters
332
+
333
+ Listener supports reporting parameters:
334
+
335
+ Example:
336
+
337
+ ```robotframework
338
+ *** Variables ***
339
+ ${var1} 1
340
+ ${var2} 1
341
+ ${var3} 2
342
+
343
+ *** Test Cases ***
344
+ Simple test
345
+ [Arguments] ${var1} ${var2} ${var3}
346
+ [Tags] qase.params:[var1, var2]
347
+ Should Be Equal As Numbers ${var1} ${var2}
348
+ Should Be Equal As Numbers ${var3} ${var3}
349
+ ```
350
+
351
+ Only `var1` and `var2` will be sent to Qase.
352
+
330
353
  ### Execution:
354
+
331
355
  ```
332
356
  robot --listener qase.robotframework.Listener someTest.robot
333
357
  ```
@@ -29,7 +29,7 @@ Configuration options are described in the
29
29
 
30
30
  ```json
31
31
  {
32
- "mode": "testops",
32
+ "mode": "testops",
33
33
  "fallback": "report",
34
34
  "debug": true,
35
35
  "testops": {
@@ -45,12 +45,12 @@ Configuration options are described in the
45
45
  "size": 100
46
46
  }
47
47
  },
48
- "report": {
48
+ "report": {
49
49
  "driver": "local",
50
50
  "connection": {
51
51
  "local": {
52
52
  "path": "./build/qase-report",
53
- "format": "json"
53
+ "format": "json"
54
54
  }
55
55
  }
56
56
  },
@@ -58,12 +58,12 @@ Configuration options are described in the
58
58
  }
59
59
  ```
60
60
 
61
-
62
61
  ## Usage
63
62
 
64
63
  ### Link tests with test cases in Qase TestOps
65
64
 
66
- To link the automated tests with the test cases in Qase TestOps, use the tags in form like `Q-<case id without project code>`.
65
+ To link the automated tests with the test cases in Qase TestOps, use the tags in form like
66
+ `Q-<case id without project code>`.
67
67
  Example:
68
68
 
69
69
  ```robotframework
@@ -96,6 +96,7 @@ Subtraction 12 - 2 - 2 8
96
96
  Listener supports reporting steps results:
97
97
 
98
98
  Example:
99
+
99
100
  ```robotframework
100
101
  Quick Get A JSON Body Test ## Test case: "Quick Get A JSON Body Test"
101
102
  [Tags] Q-3
@@ -107,7 +108,30 @@ Initializing the test case ## T
107
108
  Set To Dictionary ${info} field1=A sample string ## 1-st step - "Set To Dictionary"
108
109
  ```
109
110
 
111
+ ### Working with parameters
112
+
113
+ Listener supports reporting parameters:
114
+
115
+ Example:
116
+
117
+ ```robotframework
118
+ *** Variables ***
119
+ ${var1} 1
120
+ ${var2} 1
121
+ ${var3} 2
122
+
123
+ *** Test Cases ***
124
+ Simple test
125
+ [Arguments] ${var1} ${var2} ${var3}
126
+ [Tags] qase.params:[var1, var2]
127
+ Should Be Equal As Numbers ${var1} ${var2}
128
+ Should Be Equal As Numbers ${var3} ${var3}
129
+ ```
130
+
131
+ Only `var1` and `var2` will be sent to Qase.
132
+
110
133
  ### Execution:
134
+
111
135
  ```
112
136
  robot --listener qase.robotframework.Listener someTest.robot
113
137
  ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qase-robotframework"
7
- version = "3.2.1"
7
+ version = "3.2.2"
8
8
  description = "Qase Robot Framework Plugin"
9
9
  readme = "README.md"
10
10
  authors = [{name = "Qase Team", email = "support@qase.io"}]
@@ -17,7 +17,7 @@ classifiers = [
17
17
  urls = {"Homepage" = "https://github.com/qase-tms/qase-python/tree/master/qase-robotframework"}
18
18
  requires-python = ">=3.7"
19
19
  dependencies = [
20
- "qase-python-commons~=3.2.0",
20
+ "qase-python-commons~=3.2.1",
21
21
  "filelock~=3.12.2",
22
22
  ]
23
23
 
@@ -32,7 +32,6 @@ class Listener:
32
32
  config = ConfigManager()
33
33
  self.reporter = QaseCoreReporter(config)
34
34
  self.runtime = QaseRuntimeSingleton.get_instance()
35
- self.step_uuid = None
36
35
  self.tests = {}
37
36
  self.pabot_index = None
38
37
 
@@ -81,8 +80,6 @@ class Listener:
81
80
  def end_test(self, test, result):
82
81
  logger.debug("Finishing test '%s'", test.name)
83
82
 
84
- self.step_uuid = None
85
-
86
83
  test_metadata = TagParser.parse_tags(test.tags)
87
84
 
88
85
  if test_metadata.ignore:
@@ -100,6 +97,12 @@ class Listener:
100
97
  steps = self.__parse_steps(result)
101
98
  self.runtime.result.add_steps(steps)
102
99
 
100
+ if len(test_metadata.params) > 0:
101
+ params: dict = {}
102
+ for param in test_metadata.params:
103
+ params[param] = BuiltIn().get_variable_value(f"${{{param}}}")
104
+ self.runtime.result.params = params
105
+
103
106
  if hasattr(test, "doc"):
104
107
  self.runtime.result.add_field(Field("description", test.doc))
105
108
 
@@ -91,8 +91,10 @@ class TestMetadata:
91
91
  qase_id: Union[int, None]
92
92
  ignore: bool
93
93
  fields: dict
94
+ params: list[str]
94
95
 
95
96
  def __init__(self) -> None:
96
97
  self.qase_id = None
97
98
  self.ignore = False
98
99
  self.fields = {}
100
+ self.params = []
@@ -21,6 +21,9 @@ class TagParser:
21
21
  if tag.lower().startswith("qase.fields"):
22
22
  metadata.fields = TagParser.__extract_fields(tag)
23
23
 
24
+ if tag.lower().startswith("qase.params"):
25
+ metadata.params = TagParser.__extract_params(tag)
26
+
24
27
  return metadata
25
28
 
26
29
  @staticmethod
@@ -39,3 +42,13 @@ class TagParser:
39
42
  except ValueError as e:
40
43
  TagParser.__logger.error(f"Error parsing fields from tag '{tag}': {e}")
41
44
  return {}
45
+
46
+ @staticmethod
47
+ def __extract_params(tag: str) -> list[str]:
48
+ value = tag.split(':', 1)[-1].strip()
49
+ try:
50
+ return [item.strip() for item in value[1:-1].split(",")]
51
+ # return value.replace('[', '').replace(']', '').split(',')
52
+ except ValueError as e:
53
+ TagParser.__logger.error(f"Error parsing params from tag '{tag}': {e}")
54
+ return []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qase-robotframework
3
- Version: 3.2.1
3
+ Version: 3.2.2
4
4
  Summary: Qase Robot Framework Plugin
5
5
  Author-email: Qase Team <support@qase.io>
6
6
  License: Apache License
@@ -212,7 +212,7 @@ Classifier: Programming Language :: Python
212
212
  Requires-Python: >=3.7
213
213
  Description-Content-Type: text/markdown
214
214
  License-File: LICENSE
215
- Requires-Dist: qase-python-commons~=3.2.0
215
+ Requires-Dist: qase-python-commons~=3.2.1
216
216
  Requires-Dist: filelock~=3.12.2
217
217
  Provides-Extra: testing
218
218
  Requires-Dist: pytest; extra == "testing"
@@ -249,7 +249,7 @@ Configuration options are described in the
249
249
 
250
250
  ```json
251
251
  {
252
- "mode": "testops",
252
+ "mode": "testops",
253
253
  "fallback": "report",
254
254
  "debug": true,
255
255
  "testops": {
@@ -265,12 +265,12 @@ Configuration options are described in the
265
265
  "size": 100
266
266
  }
267
267
  },
268
- "report": {
268
+ "report": {
269
269
  "driver": "local",
270
270
  "connection": {
271
271
  "local": {
272
272
  "path": "./build/qase-report",
273
- "format": "json"
273
+ "format": "json"
274
274
  }
275
275
  }
276
276
  },
@@ -278,12 +278,12 @@ Configuration options are described in the
278
278
  }
279
279
  ```
280
280
 
281
-
282
281
  ## Usage
283
282
 
284
283
  ### Link tests with test cases in Qase TestOps
285
284
 
286
- To link the automated tests with the test cases in Qase TestOps, use the tags in form like `Q-<case id without project code>`.
285
+ To link the automated tests with the test cases in Qase TestOps, use the tags in form like
286
+ `Q-<case id without project code>`.
287
287
  Example:
288
288
 
289
289
  ```robotframework
@@ -316,6 +316,7 @@ Subtraction 12 - 2 - 2 8
316
316
  Listener supports reporting steps results:
317
317
 
318
318
  Example:
319
+
319
320
  ```robotframework
320
321
  Quick Get A JSON Body Test ## Test case: "Quick Get A JSON Body Test"
321
322
  [Tags] Q-3
@@ -327,7 +328,30 @@ Initializing the test case ## T
327
328
  Set To Dictionary ${info} field1=A sample string ## 1-st step - "Set To Dictionary"
328
329
  ```
329
330
 
331
+ ### Working with parameters
332
+
333
+ Listener supports reporting parameters:
334
+
335
+ Example:
336
+
337
+ ```robotframework
338
+ *** Variables ***
339
+ ${var1} 1
340
+ ${var2} 1
341
+ ${var3} 2
342
+
343
+ *** Test Cases ***
344
+ Simple test
345
+ [Arguments] ${var1} ${var2} ${var3}
346
+ [Tags] qase.params:[var1, var2]
347
+ Should Be Equal As Numbers ${var1} ${var2}
348
+ Should Be Equal As Numbers ${var3} ${var3}
349
+ ```
350
+
351
+ Only `var1` and `var2` will be sent to Qase.
352
+
330
353
  ### Execution:
354
+
331
355
  ```
332
356
  robot --listener qase.robotframework.Listener someTest.robot
333
357
  ```
@@ -1,4 +1,4 @@
1
- qase-python-commons~=3.2.0
1
+ qase-python-commons~=3.2.1
2
2
  filelock~=3.12.2
3
3
 
4
4
  [testing]