Skip to content

Commit

Permalink
Merge pull request #493 from qxf2/improve-test-summary
Browse files Browse the repository at this point in the history
Improved test summary
  • Loading branch information
rohandudam authored Nov 5, 2024
2 parents 038ef03 + ac1d74f commit 9a6c357
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions core_helpers/logging_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ def __init__(self):

def write_test_summary(self):
"Print out a useful, human readable summary"
self.write('\n\n************************\n--------RESULT--------\nTotal number of checks=%d'%self.result_counter)
self.write('Total number of checks passed=%d\n----------------------\n************************\n\n'%self.pass_counter)
self.write('Total number of mini-checks=%d'%self.mini_check_counter)
self.write('Total number of mini-checks passed=%d'%self.mini_check_pass_counter)
if self.result_counter==self.pass_counter:
level = "success"
else:
level = "error"
self.write('\n\n************************\n--------RESULT--------\n',level=level)
self.write('Total number of checks=%d'%self.result_counter,level=level)
self.write('Total number of checks passed=%d\n----------------------\n************************\n\n'%self.pass_counter,level=level)
if self.mini_check_counter > 0:
self.write('Total number of mini-checks=%d'%self.mini_check_counter,level=level)
self.write('Total number of mini-checks passed=%d'%self.mini_check_pass_counter,level=level)
self.make_gif()
if self.gif_file_name is not None:
self.write("Screenshots & GIF created at %s"%self.screenshot_dir)
Expand Down

0 comments on commit 9a6c357

Please sign in to comment.