background image
<< Working with Sessions | Importing a Session >>
<< Working with Sessions | Importing a Session >>
How to Split 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.
When would you want to split a session? 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 idea. If session reusability
and modularity are a priority, sessions should not be split. However, examples of
optimal times to split sessions might be:
The expectation of extended use of a session - 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
You have a login 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 login part of the script three times; therefore, you have a
simple login 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 sesion will 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.
You will specify a name for the script that you are about to begin when you finish
recording client requests for it.
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 a different order than you recorded them. Check the state of
connections used in the script and any
emulation commands or
VU commands that declare or manipulate cursors.