@@ -410,6 +410,16 @@ def start_suite(self, name: str, attributes: Dict, ts: Optional[Any] = None) ->
410
410
suite .rp_item_id = self .service .start_suite (suite = suite , ts = ts )
411
411
self ._add_current_item (suite )
412
412
413
+ def _log_data_removed (self , item_id : str , timestamp : str , message : str ) -> None :
414
+ msg = LogMessage (message )
415
+ msg .level = "DEBUG"
416
+ msg .item_id = item_id
417
+ msg .timestamp = timestamp
418
+ self .__post_log_message (msg )
419
+
420
+ def _log_keyword_content_removed (self , item_id : str , timestamp : str ) -> None :
421
+ self ._log_data_removed (item_id , timestamp , REMOVED_KEYWORD_CONTENT_LOG )
422
+
413
423
@check_rp_enabled
414
424
def end_suite (self , _ : Optional [str ], attributes : Dict , ts : Optional [Any ] = None ) -> None :
415
425
"""Finish started test suite at the ReportPortal.
@@ -420,6 +430,11 @@ def end_suite(self, _: Optional[str], attributes: Dict, ts: Optional[Any] = None
420
430
"""
421
431
suite = self ._remove_current_item ().update (attributes )
422
432
logger .debug (f"ReportPortal - End Suite: { suite .robot_attributes } " )
433
+ if attributes ["status" ] == "FAIL" and self ._remove_data_passed_tests :
434
+ self ._post_skipped_keywords (suite )
435
+ elif self ._remove_data_passed_tests :
436
+ for kwd in suite .skipped_keywords :
437
+ self ._log_keyword_content_removed (kwd .rp_item_id , kwd .start_time )
423
438
self .service .finish_suite (suite = suite , ts = ts )
424
439
if attributes ["id" ] == MAIN_SUITE_ID :
425
440
self .finish_launch (attributes , ts )
@@ -441,16 +456,6 @@ def start_test(self, name: str, attributes: Dict, ts: Optional[Any] = None) -> N
441
456
test .rp_item_id = self .service .start_test (test = test , ts = ts )
442
457
self ._add_current_item (test )
443
458
444
- def _log_data_removed (self , item_id : str , timestamp : str , message : str ) -> None :
445
- msg = LogMessage (message )
446
- msg .level = "DEBUG"
447
- msg .item_id = item_id
448
- msg .timestamp = timestamp
449
- self .__post_log_message (msg )
450
-
451
- def _log_keyword_content_removed (self , item_id : str , timestamp : str ) -> None :
452
- self ._log_data_removed (item_id , timestamp , REMOVED_KEYWORD_CONTENT_LOG )
453
-
454
459
@check_rp_enabled
455
460
def end_test (self , _ : Optional [str ], attributes : Dict , ts : Optional [Any ] = None ) -> None :
456
461
"""Finish started test case at the ReportPortal.
0 commit comments