@@ -116,8 +116,15 @@ def uri_join(*uri_parts):
116
116
class ReportPortalService (object ):
117
117
"""Service class with report portal event callbacks."""
118
118
119
- def __init__ (self , endpoint , project , token ,
120
- is_skipped_an_issue = True , verify_ssl = True , retries = None ):
119
+ def __init__ (self ,
120
+ endpoint ,
121
+ project ,
122
+ token ,
123
+ * args ,
124
+ is_skipped_an_issue = True ,
125
+ verify_ssl = True ,
126
+ retries = None ,
127
+ ** kwargs ):
121
128
"""Init the service class.
122
129
123
130
Args:
@@ -147,8 +154,14 @@ def __init__(self, endpoint, project, token,
147
154
def terminate (self , * args , ** kwargs ):
148
155
pass
149
156
150
- def start_launch (self , name , start_time , description = None , attributes = None ,
151
- mode = None ):
157
+ def start_launch (self ,
158
+ name ,
159
+ start_time ,
160
+ * agrs ,
161
+ description = None ,
162
+ attributes = None ,
163
+ mode = None ,
164
+ ** kwargs ):
152
165
if attributes is not None :
153
166
attributes = _dict_to_payload (attributes )
154
167
data = {
@@ -164,7 +177,7 @@ def start_launch(self, name, start_time, description=None, attributes=None,
164
177
logger .debug ("start_launch - ID: %s" , self .launch_id )
165
178
return self .launch_id
166
179
167
- def finish_launch (self , end_time , status = None ):
180
+ def finish_launch (self , end_time , * agrs , status = None , ** kwargs ):
168
181
"""
169
182
status can be (PASSED, FAILED, STOPPED, SKIPPED, RESETED, CANCELLED)
170
183
"""
@@ -177,8 +190,17 @@ def finish_launch(self, end_time, status=None):
177
190
logger .debug ("finish_launch - ID: %s" , self .launch_id )
178
191
return _get_msg (r )
179
192
180
- def start_test_item (self , name , start_time , item_type , description = None ,
181
- attributes = None , parameters = None , parent_item_id = None ):
193
+ def start_test_item (self ,
194
+ name ,
195
+ start_time ,
196
+ item_type ,
197
+ * args ,
198
+ description = None ,
199
+ attributes = None ,
200
+ parameters = None ,
201
+ parent_item_id = None ,
202
+ has_stats = True ,
203
+ ** kwargs ):
182
204
"""
183
205
item_type can be (SUITE, STORY, TEST, SCENARIO, STEP, BEFORE_CLASS,
184
206
BEFORE_GROUPS, BEFORE_METHOD, BEFORE_SUITE, BEFORE_TEST, AFTER_CLASS,
@@ -205,6 +227,7 @@ def start_test_item(self, name, start_time, item_type, description=None,
205
227
"launchUuid" : self .launch_id ,
206
228
"type" : item_type ,
207
229
"parameters" : parameters ,
230
+ "hasStats" : has_stats
208
231
}
209
232
if parent_item_id is not None :
210
233
url = uri_join (self .base_url_v2 , "item" , parent_item_id )
@@ -216,8 +239,14 @@ def start_test_item(self, name, start_time, item_type, description=None,
216
239
logger .debug ("start_test_item - ID: %s" , item_id )
217
240
return item_id
218
241
219
- def finish_test_item (self , item_id , end_time , status ,
220
- issue = None , attributes = None ):
242
+ def finish_test_item (self ,
243
+ item_id ,
244
+ end_time ,
245
+ status ,
246
+ * args ,
247
+ issue = None ,
248
+ attributes = None ,
249
+ ** kwargs ):
221
250
# check if skipped test should not be marked as "TO INVESTIGATE"
222
251
if issue is None and status == "SKIPPED" \
223
252
and not self .is_skipped_an_issue :
0 commit comments