From 7a221445b7e7b58bd523c7cdcc2f1b1cc22ba1eb Mon Sep 17 00:00:00 2001 From: Omkar Khatavkar Date: Mon, 15 Jan 2024 19:27:31 +0530 Subject: [PATCH] adding logic to remove passed tests video url from junit xml (#13784) (cherry picked from commit 9b1fc48cee291512b01dfcb657954e7b9b7c5529) --- pytest_plugins/video_cleanup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pytest_plugins/video_cleanup.py b/pytest_plugins/video_cleanup.py index 0eaeb57028..08bbf5721d 100644 --- a/pytest_plugins/video_cleanup.py +++ b/pytest_plugins/video_cleanup.py @@ -68,6 +68,9 @@ def pytest_runtest_makereport(item): if item.nodeid in test_results: result_info = test_results[item.nodeid] if result_info.outcome == 'passed': + report.user_properties = [ + (key, value) for key, value in report.user_properties if key != 'video_url' + ] session_id_tuple = next( (t for t in report.user_properties if t[0] == 'session_id'), None )