From e2e5e525eca7ada89b398491513ebff6bbfb9e32 Mon Sep 17 00:00:00 2001 From: Jacob Boddey Date: Wed, 5 Jun 2024 14:01:24 +0100 Subject: [PATCH 1/3] Fix issue with checking for error result --- framework/python/src/common/testreport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/python/src/common/testreport.py b/framework/python/src/common/testreport.py index 427d83793..1f1ee298f 100644 --- a/framework/python/src/common/testreport.py +++ b/framework/python/src/common/testreport.py @@ -430,7 +430,7 @@ def generate_results(self, json_data, page_num): successful_tests = 0 for test in self._results: - if test['result'] != 'Error': + if test.result != 'Error': successful_tests += 1 result_list = f''' From 9ddc23768e348cffb9d972338c65dca393bdf82a Mon Sep 17 00:00:00 2001 From: Jacob Boddey Date: Thu, 6 Jun 2024 17:16:07 +0100 Subject: [PATCH 2/3] Resolve issue --- framework/python/src/common/testreport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/python/src/common/testreport.py b/framework/python/src/common/testreport.py index 1f1ee298f..08d6bd91b 100644 --- a/framework/python/src/common/testreport.py +++ b/framework/python/src/common/testreport.py @@ -429,8 +429,8 @@ def generate_footer(self, page_num): def generate_results(self, json_data, page_num): successful_tests = 0 - for test in self._results: - if test.result != 'Error': + for test in json_data['tests']['results']: + if test['result'] != 'Error': successful_tests += 1 result_list = f''' From 8875f3700083ef32804fc82f96a2db2f9eaa9440 Mon Sep 17 00:00:00 2001 From: J Boddey Date: Thu, 6 Jun 2024 20:18:01 +0100 Subject: [PATCH 3/3] Update html in test report Signed-off-by: J Boddey --- framework/python/src/common/testreport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/python/src/common/testreport.py b/framework/python/src/common/testreport.py index 08d6bd91b..265b3f437 100644 --- a/framework/python/src/common/testreport.py +++ b/framework/python/src/common/testreport.py @@ -435,7 +435,7 @@ def generate_results(self, json_data, page_num): result_list = f'''
-

Results List ({len(successful_tests)}/{self._total_tests})

+

Results List ({successful_tests}/{self._total_tests})

Name
Description