Tuxedo protocol

Tuxedo provides middleware software services for client/server applications in heterogeneous, distributed environments. VuGen's Tuxedo protocol supports testing over a Tuxedo middleware system.

Define environment variable settings

The specific environment variables used for Tuxedo Vusers will vary according to the application under test. For some applications, you may need to define additional environment variables in the Control Panel/System dialog box.

Note: If the environment variables have changed since the last time you restarted VuGen, VuGen may record the original variable value rather than the current value.

To avoid any inconsistencies, we recommend restarting VuGen before recording Tuxedo applications.

TUXDIR The root folder for Tuxedo sources.
FLDTBLDIR List of directories containing buffer information for FML applications. Separate the names of directories with semi-colons.
FIELDTBLS List of files containing buffer information for FML applications. Separate the file names with commas.

For example:


SET FIELDTBLS=bankflds,usysflds

The following environment variables are used for Tuxedo clients that use Tuxedo/WS workstation extensions during execution:

WSNADDR Specifies the network address of the workstation listener process. This enables the client application to access Tuxedo. Separate multiple addresses with commas.
Specifies the device that accesses the network. In some cases, you may need to define this variable for specific network protocols.

For example:

SET WSNADDR=0x0002ffffc7cb4e4a

Back to top

Record Tuxedo applications

Tuxedo protocol requires the installation of a tuxedo client on the machine for both recording and replaying a script.

When recording a Tuxedo script, the Tuxedo folder, %TUXDIR%\bin, must be in the recording path.

When you record a Tuxedo application, VuGen generates LRT functions that describe the recorded actions. These functions emulate communication between a Tuxedo client and a server. Each Tuxedo function begins with an lrt, tp, tx, or F prefix.

In the following example, VuGen recorded a client's actions in a Tuxedo bank application. The client performed an action of opening a bank account and specifying all the necessary details. The session was aborted when the client specified a zero opening balance.

tpresult_int = lrt_tpbegin(30, 0);
data_0 = lrt_tpalloc("FML", "", 512);
/* Fill the data buffer data_0 with new account information */
lrt_Fadd_fld((FBFR*)data_0, "name=BRANCH_ID", "value=8", LRT_END_OF_PARMS);
lrt_Fadd_fld((FBFR*)data_0, "name=ACCT_TYPE", "value=C", LRT_END_OF_PARMS);
lrt_Fadd_fld((FBFR*)data_0, "name=MID_INIT", "value=Q", LRT_END_OF_PARMS);
lrt_Fadd_fld((FBFR*)data_0,"name=PHONE","value=123-456-7890", LRT_END_OF_PARMS);
lrt_Fadd_fld((FBFR*)data_0, "name=ADDRESS", "value=1 Broadway
                   New York, NY 10000", LRT_END_OF_PARMS);
lrt_Fadd_fld((FBFR*)data_0,"name=SSN","value=111111111", LRT_END_OF_PARMS);
lrt_Fadd_fld((FBFR*)data_0,"name=LAST_NAME", "value=Doe",LRT_END_OF_PARMS);
lrt_Fadd_fld((FBFR*)data_0,"name=FIRST_NAME", "value=BJ",LRT_END_OF_PARMS);
lrt_Fadd_fld((FBFR*)data_0, "name=SAMOUNT", "value=0.00",LRT_END_OF_PARMS);
/* Open a new account */
tpresult_int = lrt_tpcall("OPEN_ACCT", data_0, 0, =;data_0, =;olen_2, 0);

Back to top

Tuxedo buffer data

When you use VuGen to create a Tuxedo Vuser script, your actions are recorded into the three sections of the script: vuser_init, Actions, and vuser_end.

The data that is received or transmitted is stored in data buffers, which can be very large. In order to simplify the appearance of the script, the actual data is stored in external files—not in the C file. When a data transfer occurs, the data is copied from the external file into a temporary buffer.

The external file is called replay.vdf, and it contains the contents of all the temporary buffers. The buffers' contents are stored as sequential records. The records are marked by identifiers indicating whether the data was sent or received, and the buffer descriptor. The LRT functions use the buffer descriptors to access the data.

You can use VuGen to view the contents of the data file by selecting the replay.vdf file in the Solution Explorer.

The option to view a data file is available by default for Tuxedo scripts.

Back to top

Tuxedo parameters

Tuxedo scripts contain strings of type "name=..." or "value=...". You can only define parameters for the portion of the string following the equal sign (=). For example:

lrt_Fadd_fld((FBFR*)data_0,"name=PHONE","value= {parameter_1}", LRT_END_OF_PARMS);

In general, we recommend that you use lrt_save_parm to save a portion of a character array to a parameter. Use lrt_save_searched_string when you want to save information, relative to the position of a particular string in a character array.

Back to top

Tuxedo known issues

This section describes known issues for Tuxedo Vusers.

  • If you encounter problems recording or replaying Tuxedo applications, or the script is missing a call to lrt_tpinitialize, contact Customer Support to check which DLLs are used with the application.

  • If you encounter problems recording or running Tuxedo applications, check that the Tuxedo application runs without VuGen, and that the environment variables have been defined correctly. For more information, see Tuxedo buffer data. Note that after you set or modify the Tuxedo variables, you should restart VuGen and your application, in order for the changes to take effect.

  • If you experience problems during execution, check the Tuxedo log file on the side of the server for error messages. By default, this file is found in the folder indicated by the environment variable APPDIR. The file name has the form ULOG.mmddyy, where mmddyy indicates the current month, day, and year.

    The default location of this file can be changed by setting the environment variable ULOGPFX on the server. A log file can also be found on the client side, in the current folder, unless the ULOGPFX variable changes its location.

Back to top

See also: