T-Plan Robot Enterprise 2.3.5 Tool Panel
Contents
1. Tool Panel Overview
2. Settings Tab
3. Events Tab
4. Keys Tab
5. Variables Tab
1. Tool Panel Overview
Tool Panel is situated in the
top left
corner of the T-Plan Robot Enterprise window. It provides various controls which
usually work accross the scripting editor, test script interpret and
desktop viewer functionality. It consists of four tabs:
- Settings
tab configures I/O
settings of the script in the active editor, especially the output and
template paths and the report file.
- Events
tab displays a summary of recent events received from the
desktop server. The content depends on the desktop protocol
capabilities and some clients may not populate it at all.
- Keys
tab deals with key transfer to the desktop and allows to
construct and send various key combinations including those which are
otherwise captured by the local operating system.
- Variables
tab provides table of variables available for the script in the
active editor.
The Tool Panel is by default always visible. To hide it select
the Display Tool Panel
check box in the Tools menu. This flag is valid for the time the
application is running. To set the panel invisible on application
startup open the Preferences window and
select the Tool Panel tree
node.
2. Settings Tab
This tab works closely with the script in the active editor. The
controls it contains correspond to commands in the test script and any
change will be also reflected in the script content. Its components
include:
- Output Path which is directory
where screenshots, reports
and
other output files resulting from the script execution will be saved
to. When you change the path, script
variable _REPORT_DIR
will be updated in the active editor. Default path is defined in the
Language panel of the Preferences window. If this preference is not
set, the path defaults to the user home
directory.
- Template Path, i.e. directory
which will be searched for
image comparison template images. When you change the path, script
variable _TEMPLATE_DIR
will be updated in the active editor. Default path is defined in the
Language panel of the Preferences
window. If this preference is not set, the path defaults to the user
home
directory.
- Create report
- select this option
to insert a Report
command into the active editor or deselect to delete it. There are
two
more options, Report File and Description.
The
report file field contains the report file
name. Format of the report is detected by the file extension. While the
default open source provider supports just HTML (
.htm
, .html
),
the
Enterprise one also supports XML (.xml
). Default value
is 'index.html
'.
- Description,
which will be displayed in the report
header. See the sample reports created by the default (HTML)
and
enterprise (HTML, XML)
report
providers (external links).
An example displayed on the left will insert the following code into
the
active editor:
Var _REPORT_DIR="/tmp/report"
Var _TEMPLATE_DIR="/tmp/templates"
Report "index.html" desc="Example report"
Similarily when you update any of the commands listed above manually in
the editor, the fields of the Settings tab will change as soon as the
script gets compiled. Be aware that if the on-the-fly compilation is switched off,
the fields remain out of sync with the script until you either compile
the script manually or execute it.
3. Events Tab
Events tab displays the most recent list of events received from the
desktop server. The event list gets reset by user actions, e.g. mouse
click, press of Enter etc. The point is to provide just the list of
events (updates) generated by the server in response on a user action.
This allows to create an instance WaitFor command which
waits for a particular event, for example for an update of the desktop
image.
Be aware that content of the event list depends on the particular
client capabilities and some clients may fail to populate it. The most
used RFB (VNC) server delivers two types of events:
- Update events, i.e. FramebufferUpdate events defined by
the RFB protocol. These events represent update of a certain area of
the
remote desktop. If you select one or more events, the areas defined by
them will display in the remote desktop as red frames. This feature may
help you to inspect how the RFB server updates the desktop screen and
tune instances of the Waitfor
update command. Each event in the list displays the update
rectangle
in form of x:<x>,y:<y>,w:<width>,h:<height>,
extent of the update as a percentage of the whole window and time from
the last user action. Note that the list displays only update events
which are greater than a certain extent. This limit is by default set
to
10% and can be customized in the Preferences
window.
- Bell events which indicate that
the remote server beeped
(i.e. printed the Bell ASCII 0x07 character). You may take advantage of
these events to determine that execution of a CLI command finished or
succeeded/failed. See the Waitfor
bell command
for more information and examples.
As an example we executed a command "ls -l
/usr/java/jdk1.6.0_13 && echo -e '\007'
" in a terminal
window on
Linux. It lists content of the given directory and emits a beep (prints
out the ASCII 0x07 BELL character) if the listing is successful. The
first event in the list represents update of the console
window caused by the directory listing. When you select this event in
the table, the updated area will display as a red frame in the remote
desktop as is visible on the picture. The second event is the bell
character printed by the echo command. Though WaitFor command may be
generated for any of these two events, waiting for the bell is in this
case more reliable because you are sure that the directory listing
executed correctly.
There's a small tool bar below the event table. It contains 3 buttons:
- Button will
insert a
WaitFor command into the current editor. The command will be
constructed
based on selected event(s) and options defined in the recording
preferences (panels Update Events and Bell Events in the Preferences window).
- Button
will open the WaitFor
Command Window where
you can construct a WaitFor command with custom options.
- Button will open the Preferences
window with recording options which are being applied to the previous
two actions.
4. Keys Tab
Keys tab is aimed to help you to send such keys to the remote desktop
which are reserved by your system. A typical example is Ctrl+Alt+Del,
which is interpreted both by Windows and Linux systems as a system
command. If you want to send this key to the remote desktop without
conflicting with your system, you may use the tools provided by this
panel.
There are two options:
- Quick Press allows you to select a predefined key in the
drop down and send it to the remote desktop. The list is currently
limited to the most frequently used key combinations. If you want to
customize the list, modify the
recording.quickKeys
option
in your
configuration file.
- Create Press allows you to
create virtually any
combination
of keys. To press a key select the modifiers (Alt, Ctrl, Shift,
Windows), choose a key in the drop down and press Apply. Note that the
content of the key drop down is derived from Java internal classes. See
the Key
Browser help page for more info.
If recording is selected and you generate a key using this tool, a
Press command will be inserted into the active editor. If the recording
feature is off, you will be asked whether you want to insert the
command besides sending it to the desktop
or not.
5. Variables Tab
This tab contains a table of variables which are currently present in
the compilation (the "Compilation Vars" tab) and
execution ("Execution Vars")
contexts.
There are
generally two types of variables:
- Predefined variables,
sometimes
also called implicit ones. Their name typically starts with
underscore '_'. These are created by the underlying automation
framework automatically for each script compilation or execution and/or
generated by particular elements (commands) of the script.
- Custom variables defined in the script
through the Var and Eval commands. These
variables are not available for Java test scripts unless they are
populated through the setVariable()
methods of the context object..
The
picture on the left displays an example of the variable table after
compilation of a simple script with a variable called
MY_VARIABLE. A right click onto the variable opens up a context
menu with the following actions (also available through buttons below
the table):
- The "View MY_VARIABLE
value" displays a simple window with its value. This allows to
view long and/or multiline values. Viewing of the variable value is
also possible through a double click onto the variable.
- The
"Copy variable name to the clipboard" menu item (button) will
copy the variable name enclosed in curly braces to the
system clipboard from where it can be pasted to any other application.
- The
"Copy variable
value to the clipboard" item (button) will copy the variable
value to the
system clipboard.
- The
"Copy variable
name to the active editor" item
(button) will copy the variable name enclosed in curly braces to the
active editor. This is in fact a variable call and it will be replaced
with the actual variable value when the script gets executed.
- The
"Copy variable
value to the active editor" item (button) will copy the
variable value to the active editor.
Variables may have a fixed value through the -v/--variable
CLI option. Such variables have
the '(fixed)' suffix appended to their name. For example, the image on
the left displays a fixed variable called MY_FIXED_VARIABLE because the
tool was started with the -v "MY_FIXED_VARIABLE=fixed"
CLI option. Fixed variables can't be changed in the script and their
value remains constant for the whole time of T-Plan Robot Enterprise execution. If
you make an attempt to modify such variable using the Var or Eval
command, it will be ignored and no error message or warning will be
reported. This mechanism was designed to allow to design parametrized
test scripts.