From 6bd543a8e4574b634d7eadf1f646ee3d792b6b63 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Fri, 23 Aug 2024 10:40:09 +0100 Subject: [PATCH] fix(test_stats.py)_: report path --- _assets/scripts/test_stats.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/_assets/scripts/test_stats.py b/_assets/scripts/test_stats.py index abd610ac8..fa1aeb6c0 100755 --- a/_assets/scripts/test_stats.py +++ b/_assets/scripts/test_stats.py @@ -6,18 +6,17 @@ from collections import defaultdict test_stats = defaultdict(lambda: defaultdict(int)) -for file in glob.glob("**/report_*.xml", recursive=True): - tree = ET.parse(file) - root = tree.getroot() - for testcase in root.iter("testcase"): - test_name = testcase.attrib["name"] +tree = ET.parse("report.xml") +root = tree.getroot() +for testcase in root.iter("testcase"): + test_name = testcase.attrib["name"] - test_stats[test_name]["total_runs"] += 1 + test_stats[test_name]["total_runs"] += 1 - if testcase.find("failure") is not None: - test_stats[test_name]["failed_runs"] += 1 - elif testcase.find("error") is not None: - test_stats[test_name]["failed_runs"] += 1 + if testcase.find("failure") is not None: + test_stats[test_name]["failed_runs"] += 1 + elif testcase.find("error") is not None: + test_stats[test_name]["failed_runs"] += 1 failing_test_stats = [ {