From c0382fefdfc4436a1bfe4e7a8b4cf7a87552f0e0 Mon Sep 17 00:00:00 2001 From: Thales Lima Date: Thu, 8 Aug 2024 17:02:31 +0200 Subject: [PATCH] Add aftermath logs --- testing/src/runner/runner.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/testing/src/runner/runner.py b/testing/src/runner/runner.py index bf17ef3..1388068 100644 --- a/testing/src/runner/runner.py +++ b/testing/src/runner/runner.py @@ -89,6 +89,9 @@ class TestRunner: def run_tests(self) -> None: """Run all tests specified in the configuration.""" print(f"Running tests ...") + + failed_tests = [] + for test in self.config.tests: self.tycho_runner.empty_database(self.db_url) @@ -109,9 +112,18 @@ class TestRunner: ) if result.success: - print(f"✅ {test.name} passed.") + print(f"\n✅ {test.name} passed.\n") else: - print(f"❗️ {test.name} failed: {result.message}") + print(f"\n❗️ {test.name} failed: {result.message}\n") + + print( + "\nTest finished! \n" + f"Passed: {len(self.config.tests) - len(failed_tests)}/{len(self.config.tests)}\n" + ) + if failed_tests: + print("Failed tests:") + for failed_test in failed_tests: + print(failed_test) def validate_state( self,