@@ -134,6 +134,7 @@ class TestRunnerPlugin(Plugin):
134134 "profile_name" : "robot" ,
135135 "show_console_log" : True ,
136136 "show_message_log" : True ,
137+ "active_status_bar" : True ,
137138 "sash_position" : 200 ,
138139 "run_profiles" :
139140 [('jybot' , 'jybot' + ('.bat' if os .name == 'nt' else '' )),
@@ -178,6 +179,7 @@ def __init__(self, application=None):
178179 self ._initmemory = None
179180 self ._limitmemory = None # This will be +80%
180181 self ._maxmemmsg = None
182+ self .active_status_bar = self .__getattr__ ('active_status_bar' )
181183 self .use_colors = self .__getattr__ ('use colors' )
182184 self .fail_color = self .__getattr__ ('fail color' )
183185 self .pass_color = self .__getattr__ ('pass color' )
@@ -321,30 +323,40 @@ def on_stop(self, event):
321323 self ._append_to_console_log (_ ('[ SENDING STOP SIGNAL ]\n ' ),
322324 source = 'stderr' )
323325 self ._test_runner .send_stop_signal ()
326+ if self .active_status_bar :
327+ self .statusbar_message (_ ('[ SENDING STOP SIGNAL ]\n ' ), 5000 )
324328
325329 def on_pause (self , event ):
326330 __ = event
327331 self ._reset_memory_calc ()
328332 self ._append_to_console_log (_ ('[ SENDING PAUSE SIGNAL ]\n ' ))
329333 self ._test_runner .send_pause_signal ()
334+ if self .active_status_bar :
335+ self .statusbar_message (_ ('[ SENDING PAUSE SIGNAL ]\n ' ), 5000 )
330336
331337 def on_continue (self , event ):
332338 __ = event
333339 self ._reset_memory_calc ()
334340 self ._append_to_console_log (_ ('[ SENDING CONTINUE SIGNAL ]\n ' ))
335341 self ._test_runner .send_continue_signal ()
342+ if self .active_status_bar :
343+ self .statusbar_message (_ ('[ SENDING CONTINUE SIGNAL ]\n ' ), 5000 )
336344
337345 def on_step_next (self , event ):
338346 __ = event
339347 self ._reset_memory_calc ()
340348 self ._append_to_console_log (_ ('[ SENDING STEP NEXT SIGNAL ]\n ' ))
341349 self ._test_runner .send_step_next_signal ()
350+ if self .active_status_bar :
351+ self .statusbar_message (_ ('[ SENDING STEP NEXT SIGNAL ]\n ' ), 5000 )
342352
343353 def on_step_over (self , event ):
344354 __ = event
345355 self ._reset_memory_calc ()
346356 self ._append_to_console_log (_ ('[ SENDING STEP OVER SIGNAL ]\n ' ))
347357 self ._test_runner .send_step_over_signal ()
358+ if self .active_status_bar :
359+ self .statusbar_message (_ ('[ SENDING STEP OVER SIGNAL ]\n ' ), 5000 )
348360
349361 def on_run (self , event ):
350362 """ Called when the user clicks or presses the F8, Run Tests """
@@ -921,7 +933,8 @@ def _build_output_panel(self, parent):
921933 panel = wx .Panel (parent )
922934 panel .SetBackgroundColour (self ._mysettings .color_background )
923935 panel .SetForegroundColour (self ._mysettings .color_foreground )
924- self ._progress_bar = ProgressBar (panel , self .fail_color , self .pass_color , self .skip_color )
936+ self ._progress_bar = ProgressBar (panel , self .fail_color , self .pass_color , self .skip_color ,
937+ self .active_status_bar , caller = self )
925938 self ._console_log_panel , self ._console_log_ctrl = \
926939 self ._create_collapsible_pane (panel , _ ('Console log' ),
927940 self .show_console_log ,
@@ -1092,11 +1105,15 @@ def _handle_paused(self, args):
10921105 __ = args
10931106 wx .CallAfter (self ._set_paused )
10941107 self ._log_message_queue .put (_ ('<< PAUSED >>' ))
1108+ if self .active_status_bar :
1109+ self .statusbar_message (_ ('<< PAUSED >>' ))
10951110
10961111 def _handle_continue (self , args ):
10971112 __ = args
10981113 wx .CallAfter (self ._set_continue )
10991114 self ._log_message_queue .put (_ ('<< CONTINUE >>' ))
1115+ if self .active_status_bar :
1116+ self .statusbar_message (_ ('<< CONTINUE >>' ), 5000 )
11001117
11011118 def _set_running (self ):
11021119 self ._run_action .disable ()
@@ -1105,6 +1122,8 @@ def _set_running(self):
11051122 self .get_current_profile ().disable_toolbar ()
11061123 self ._running = True
11071124 self ._test_runner .test_execution_started ()
1125+ if self .active_status_bar :
1126+ self .statusbar_clear ()
11081127
11091128 def _set_paused (self ):
11101129 self ._run_action .disable ()
@@ -1122,6 +1141,8 @@ def _set_stopped(self):
11221141 self ._enable_runner_toolbar (True , False )
11231142 self .get_current_profile ().enable_toolbar ()
11241143 self ._running = False
1144+ if self .active_status_bar :
1145+ self .statusbar_clear ()
11251146
11261147 def _enable_runner_toolbar (self , run , paused ):
11271148 stop = not run
@@ -1146,7 +1167,8 @@ def _notify_user_no_logs_directory():
11461167class ProgressBar (wx .Panel ):
11471168 """A progress bar for the test runner plugin"""
11481169
1149- def __init__ (self , parent , fail_color = '#FF8E8E' , pass_color = "#9FCC9F" , skip_color = 'yellow' ):
1170+ def __init__ (self , parent , fail_color = '#FF8E8E' , pass_color = "#9FCC9F" , skip_color = 'yellow' ,
1171+ active_status_bar = False , caller = None ):
11501172 wx .Panel .__init__ (self , parent , wx .ID_ANY )
11511173 self ._sizer = wx .BoxSizer (wx .HORIZONTAL )
11521174 self ._gauge = wx .Gauge (self , size = (100 , 15 ), style = wx .GA_HORIZONTAL )
@@ -1158,6 +1180,8 @@ def __init__(self, parent, fail_color='#FF8E8E', pass_color="#9FCC9F", skip_colo
11581180 self ._gauge .Hide ()
11591181 self ._default_colour = parent .GetBackgroundColour ()
11601182 self ._foreground_colour = parent .GetForegroundColour ()
1183+ self .active_status_bar = active_status_bar
1184+ self .caller = caller
11611185 self .fail_color = fail_color
11621186 self .pass_color = pass_color
11631187 self .skip_color = skip_color
@@ -1227,7 +1251,8 @@ def _update_message(self):
12271251 elapsed = time .time () - self ._start_time
12281252 message = _ ("elapsed time: %s pass: %s skip: %s fail: %s" ) % (
12291253 self ._seconds_to_string (elapsed ), self ._pass , self ._skip , self ._fail )
1230- message += self ._get_current_keyword_text ()
1254+ current_keyword = self ._get_current_keyword_text ()
1255+ message += current_keyword
12311256 if self ._fail > 0 :
12321257 self .SetForegroundColour (self .get_visible_color (self .fail_color ))
12331258 self .SetBackgroundColour (self .fail_color )
@@ -1249,6 +1274,8 @@ def _update_message(self):
12491274 self ._label .SetForegroundColour (self ._foreground_colour )
12501275 self ._label .SetBackgroundColour (self ._default_colour )
12511276 self ._label .SetLabel (message )
1277+ if self .active_status_bar and self .caller :
1278+ self .caller .statusbar_message (current_keyword )
12521279 # not sure why this is required, but without it the background
12531280 # colors don't look right on Windows
12541281 self .Refresh ()
0 commit comments