@@ -417,9 +417,11 @@ def run_all_tests(self, skip_auth: bool = False):
417417 if self .env_uuid :
418418 self .test ("Get all queries" , "GET" ,
419419 f"{ API_PREFIX } /queries/{ self .env_uuid } " ,
420+ expected_status = [200 , 404 ],
420421 skip_if_no_token = True )
421422 self .test ("Get all queries (alt endpoint)" , "GET" ,
422423 f"{ API_PREFIX } /all-queries/{ self .env_uuid } " ,
424+ expected_status = [200 , 404 ],
423425 skip_if_no_token = True )
424426 print ()
425427
@@ -446,19 +448,37 @@ def run_all_tests(self, skip_auth: bool = False):
446448 self .print_summary ()
447449
448450 def print_summary (self ):
449- """Print test summary"""
451+ """Print test summary with emojis """
450452 total = self .passed + self .failed + self .skipped
451- self .log (f"\n { Colors .BOLD } === Test Summary ==={ Colors .RESET } " )
452- self .log (f"Total tests: { total } " )
453- self .log (f"{ Colors .GREEN } Passed: { self .passed } { Colors .RESET } " )
454- self .log (f"{ Colors .RED } Failed: { self .failed } { Colors .RESET } " )
455- self .log (f"{ Colors .YELLOW } Skipped: { self .skipped } { Colors .RESET } " )
453+ pass_rate = (self .passed / total * 100 ) if total > 0 else 0
454+
455+ self .log (f"\n { Colors .BOLD } { '=' * 50 } { Colors .RESET } " )
456+ self .log (f"{ Colors .BOLD } π Test Summary{ Colors .RESET } " )
457+ self .log (f"{ Colors .BOLD } { '=' * 50 } { Colors .RESET } \n " )
458+
459+ self .log (f"π Total tests: { total } " )
460+ self .log (f"{ Colors .GREEN } β
Passed: { self .passed } ({ pass_rate :.1f} %){ Colors .RESET } " )
461+ self .log (f"{ Colors .RED } β Failed: { self .failed } { Colors .RESET } " )
462+ self .log (f"{ Colors .YELLOW } βοΈ Skipped: { self .skipped } { Colors .RESET } " )
456463
457464 if self .failed > 0 :
458- self .log (f"\n { Colors .BOLD } Failed tests:{ Colors .RESET } " )
465+ self .log (f"\n { Colors .BOLD } { '=' * 50 } { Colors .RESET } " )
466+ self .log (f"{ Colors .BOLD } β Failed tests:{ Colors .RESET } " )
467+ self .log (f"{ Colors .BOLD } { '=' * 50 } { Colors .RESET } " )
459468 for result in self .test_results :
460469 if result ['status' ] == 'failed' :
461- self .log (f" - { result ['name' ]} : { result ['message' ]} " , Colors .RED )
470+ self .log (f" π΄ { result ['name' ]} " , Colors .RED )
471+ self .log (f" ββ { result ['message' ]} " , Colors .RED )
472+
473+ # Overall result
474+ self .log (f"\n { Colors .BOLD } { '=' * 50 } { Colors .RESET } " )
475+ if self .failed == 0 and self .passed > 0 :
476+ self .log (f"{ Colors .GREEN } { Colors .BOLD } π All tests passed!{ Colors .RESET } " )
477+ elif self .failed > 0 :
478+ self .log (f"{ Colors .RED } { Colors .BOLD } β οΈ Some tests failed!{ Colors .RESET } " )
479+ else :
480+ self .log (f"{ Colors .YELLOW } { Colors .BOLD } β οΈ No tests were run{ Colors .RESET } " )
481+ self .log (f"{ Colors .BOLD } { '=' * 50 } { Colors .RESET } \n " )
462482
463483 # Exit with appropriate code
464484 if self .failed > 0 :
0 commit comments