background image
<< Playing Back a Script Quickly | Importing a Session >>
<< Playing Back a Script Quickly | Importing a Session >>

Splitting a Session into Multiple Scripts

Working with Sessions
Splitting a Session into Multiple Scripts
Splitting a session signifies that everything you have recorded represents one logical
unit of work, such as a login to a database. When you split a session, you name the
completed script and start a new script. You can continue recording transactions and
splitting the session into as many scripts as you want.
If quick script development time is a priority -- perhaps because testable builds are
developed daily or because Web content is updated daily -- splitting sessions may
not be the best option. If session reusability and modularity are a priority, sessions
should not be split. However, examples of optimal times to split sessions might be:
You want to use a session extensively -- for instance, a single release of an
application that will be tested on ten different hardware configurations. The
testing would take a month to complete and the code would be frozen. In this
case, time invested in splitting sessions is spread over a long, fixed period.
You have a logon process that requires a lot of manual script modifications in
order to work robustly. You may have three user groups, and you do not want
to edit the logon part of the script three times; therefore, you have a simple logon
script for all three user groups.
You want to "mix and match" activities from different sessions.
You record some parts of a session that need to be repeated multiple times at
playback, while other parts of the session do not need to be repeated.
How to Split a Session into Multiple Scripts
To split a session into multiple scripts:
1. During recording, at the point where you want to end one script and begin a new
one, click the Split Script button on the Session Record floating toolbar.
2. Enter a name for the script that you are ending or accept the default name.
Specify a name for the script that you are about to begin when you finish
recording client requests.
NOTE: If you split a session into multiple scripts, you should examine the
resulting scripts to make sure that they begin and end at a known state. This is
particularly important if you plan to use a split script as part of a loop or to run a
series of scripts in an order different from how you recorded them. Check the
state of connections used in the script and any
commands or VU commands that declare or manipulate cursors. Robot does not
support session splitting for VB scripts.