Skip to content

Commit b6e16a5

Browse files
Added current executing keyword and other statuses to TestRunner status bar
1 parent db6eaad commit b6e16a5

File tree

5 files changed

+34
-5
lines changed

5 files changed

+34
-5
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni
99
== https://github.com/robotframework/RIDE[Unreleased]
1010

1111
=== Added
12+
- Added current executing keyword and other statuses to TestRunner status bar.
1213
- Added Config Panel button to supported installed Plugins next to their name in Plugin Manager dialog.
1314
- Added Config Panel button to Plugins, working example in Text Editor.
1415
- Added divided Status Bar. Left side for main window, right side for Plugins. Working example in Text Editor,

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Likewise, the current version of wxPython, is 4.2.2, but RIDE is known to work w
4040

4141
`pip install -U robotframework-ride`
4242

43-
(3.8 <= python <= 3.13) Install current development version (**2.2dev18**) with:
43+
(3.8 <= python <= 3.13) Install current development version (**2.2dev19**) with:
4444

4545
`pip install -U https://github.com/robotframework/RIDE/archive/develop.zip`
4646

src/robotide/application/releasenotes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ def set_content(self, html_win, content):
170170
</ul>
171171
<p><strong>New Features and Fixes Highlights</strong></p>
172172
<ul class="simple">
173+
<li>Added current executing keyword and other statuses to TestRunner status bar.</li>
173174
<li>Modified import statements to allow running RIDE without Robot Framework installed or versions older than 6.0.</li>
174175
<li>Added Config Panel button to supported installed Plugins next to their name in Plugin Manager dialog.</li>
175176
<li>Added Config Panel button to Plugins, working example in Text Editor.</li>

src/robotide/contrib/testrunner/testrunnerplugin.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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():
11461167
class 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()

src/robotide/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
#
1616
# Automatically generated by `tasks.py`.
1717

18-
VERSION = 'v2.2dev18'
18+
VERSION = 'v2.2dev19'

0 commit comments

Comments
 (0)