From 40e6b9cd1ac05145ebe55b369984b58c99e26ee0 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 35c6fb5fb13..a88d626d267 100644 --- a/pytest_plugins/video_cleanup.py +++ b/pytest_plugins/video_cleanup.py @@ -67,6 +67,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 )