background image
<< Testing Your Recorded Script | Playing Back a Shell Script >>
<< Testing Your Recorded Script | Playing Back a Shell Script >>

Creating a Shell Script

Creating Shell Scripts to Play Back Scripts in Sequence
2-25
Creating Shell Scripts to Play Back Scripts in Sequence
After you have created each GUI script and verified that it performs as intended, you
may want to group the scripts into a shell script. A shell script is a script that plays
back other scripts in sequence.
For example, you could have:
One script that starts your application.
A second that searches for and opens a particular file.
A third that modifies the file.
A fourth that closes the application and returns to the starting point.
Combined into a single-shell script, scripts can run in unattended mode and perform
comprehensive test coverage. The results from all scripts are stored in the same log,
which simplifies results analysis.
For unattended testing, each shell script should return to a common point in the
application-under-test. This common point could be a main menu, a specific
window or dialog box, or even the Windows desktop. This assures that script
playback remains synchronized with the application-under-test.
Before creating a shell script, you must have already recorded the individual scripts
that you intend to include.
Creating a Shell Script
To create a shell script:
1. Click File > New > GUI Shell Script.
2. Type a name (40 characters maximum).
3. Optionally, type a description.
4. Click OK.
5. To add scripts, select one or more scripts in the Available list and click > or >>.
Robot plays back scripts in the same order in which they appear in the Selected
list.
6. Click OK.
The shell script contains a
CallScript
command followed by the name of each
script that you included.