Configuring Datapools, Synchronization Points, and Shared Variables

prevnext

Synchronization Point and Shared Variable Configuration


Generated scripts that use synchronization points or shared variables includes ordinary synchronization point and shared variable method statements (see Synchronization Class). In addition, the .res files for those scripts will include String Table data. For example, suppose a generated script named IE5test includes these statements:

tssSync.SyncPoint "BlockUntilSaveComplete"
....
tssSync.SharedVarAssign "lineCounter",val,SHVOP_ADD

If you go to the project directory and open IE5test.res, you\xd5 ll see String Table information similar to the following:

For generated scripts such as in this example, no action is required. However, for any synchronization points or shared variables that you manually insert into a script, you must insure that the .res file contains information such as that shown above.


Adding String Table Data to a Resource File

If you manually write a Visual Basic script that uses datapools, synchronization points, or shared variables, or if you manually add method statements for any of these to a generated script, you must add String Table data to the project resource file. The procedures are summarized below.

A generated Visual Basic project (.vbp) file contains the lines shown below. If you create a Visual Basic project from the IDE, you must add these reference lines to the project file.

A Visual Basic script must be compiled into a .dll file. When you do this, a .rc file is produced. To get a .res file, you then compile the .rc file with the resource compiler.

When you open the .res file for a hand-written script (or for a generated script that included no datapool, synchronization point, and shared variable statements), you see an empty file.

To add content to this file:

  1. Select Insert > Resource. The Insert Resource dialog appears.

  2. Select String Table and click New. An empty string table row (darkened) appears.

  3. Place your cursor on the darkened row, click button 3, and select Properties. The String Properties dialog appears.

  4. In the ID field, enter an ID number. In the Caption field, enter a value. For example, to configure a synchronization point named sync1, enter sync1. Then click the x on the upper right corner. This saves the String table entry as shown below.

Repeat the steps above until the resource file contains entries for all manually-inserted datapool, synchronization points, and shared variables.

prevnext


Rational Test Script Services for Visual Basic Rational Software Corporation
Copyright (c) 2003, Rational Software Corporation http://www.rational.com
support@rational.com
info@rational.com