Skip to content

Commit 897d6eb

Browse files
authored
Merge branch 'master' into bugfix/24-1
2 parents 59befba + cfe7030 commit 897d6eb

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ test = service.start_test_item(name="Test Case",
7676
description="First Test Case",
7777
tags=["Image", "Smoke"],
7878
start_time=timestamp(),
79-
item_type="STEP")
79+
item_type="STEP",
80+
parameters={"key1": "val1",
81+
"key2": "val2"})
8082

8183
# Create text log message with INFO level.
8284
service.log(time=timestamp(),

reportportal_client/service.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,31 @@ def stop_launch(self, end_time, status=None):
148148
status=status)
149149

150150
def start_test_item(self, name, start_time, item_type, description=None,
151-
tags=None):
151+
tags=None, parameters=None):
152152
"""
153153
item_type can be (SUITE, STORY, TEST, SCENARIO, STEP, BEFORE_CLASS,
154154
BEFORE_GROUPS, BEFORE_METHOD, BEFORE_SUITE, BEFORE_TEST, AFTER_CLASS,
155155
AFTER_GROUPS, AFTER_METHOD, AFTER_SUITE, AFTER_TEST)
156+
157+
parameters should be a dictionary with the following format:
158+
{
159+
"<key1>": "<value1>",
160+
"<key2>": "<value2>",
161+
...
162+
}
156163
"""
164+
if parameters is not None:
165+
parameters = [{"key": key, "value": str(value)}
166+
for key, value in parameters.items()]
167+
157168
data = {
158169
"name": name,
159170
"description": description,
160171
"tags": tags,
161172
"start_time": start_time,
162173
"launch_id": self.launch_id,
163174
"type": item_type,
175+
"parameters": parameters,
164176
}
165177
parent_item_id = self.stack[-1]
166178
if parent_item_id is not None:

reportportal_client/service_async.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def stop_launch(self, end_time, status=None):
241241
self.queue.put_nowait(("stop_launch", args))
242242

243243
def start_test_item(self, name, start_time, item_type, description=None,
244-
tags=None):
244+
tags=None, parameters=None):
245245
logger.debug("start_test_item queued")
246246

247247
args = {
@@ -250,6 +250,7 @@ def start_test_item(self, name, start_time, item_type, description=None,
250250
"tags": tags,
251251
"start_time": start_time,
252252
"item_type": item_type,
253+
"parameters": parameters,
253254
}
254255
self.queue.put_nowait(("start_test_item", args))
255256

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
setup(
44
name='reportportal-client',
55
packages=find_packages(),
6-
version='3.1.0',
6+
version='3.2.0',
77
description='Python client for Report Portal',
88
author='Artsiom Tkachou',
99
author_email='[email protected]',
1010
url='https://github.com/reportportal/client-Python',
11-
download_url='https://github.com/reportportal/client-Python/tarball/3.0.0',
11+
download_url='https://github.com/reportportal/client-Python/tarball/3.2.0',
1212
license='GNU General Public License v3',
1313
keywords=['testing', 'reporting', 'reportportal'],
1414
classifiers=[],

0 commit comments

Comments
 (0)