Wednesday, July 3, 2013

RTE Protocol in Load runnner

An RTE Vuser types character input into a terminal emulator, submits the data to a server, and then waits for the server to respond. For instance,suppose that you have a server that maintains customer information for a maintenance company. Every time a field service representative makes a repair, he accesses the server database by modem using a terminal emulator.

The service representative accesses information about the customer and then records the details of the repair that he performs.You could use RTE Vusers to emulate this case. An 

RTE Vuser would:
1 Type 60 at the command line to open an application program.
2 Type F296, the field service representative’s number.
3 Type NY270, the customer number.
4 Wait for the word "Details" to appear on the screen. The appearance of "Details" indicates that all the customer details are displayed on the screen.
5 Type Changed gasket P249, and performed Major Service the details of the current repair.
6 Type Q to close the application program.

You use VuGen to create RTE Vuser scripts. The script generator records the actions of a human user in a terminal emulator. It records the keyboard input from the terminal window, generates the appropriate statements, and inserts them into the Vuser script. While you record, the script generator automatically inserts synchronization functions into the script.

The functions developed to emulate a terminal communicating with a server are called TE Vuser functions. Each TE Vuser function has a TE prefix.VuGen automatically records most of the TE functions listed in this section during an RTE session. You can also manually program any of the functions into your script.
An RTE Vuser emulates the actions of a real user. Human users use terminals or terminal emulators to operate application programs.In the RTE Vuser environment, a Vuser replaces the human. The Vuser operates PowerTerm, a terminal emulator. PowerTerm works like a standard terminal emulator, supporting common protocols such as IBM 3270 & 5250, VT100, VT220, and VT420-7.

Working with Ericom Terminal Emulation

VuGen supports record and replay with Ericom Terminal Emulators.The Ericom support handles escape sequences during record and replay.Ericom’s PowerTerm lets you map PC keys to custom escape sequences. For information about mapping, see the PowerTerm help.
When a user presses mapped keys while recording an Ericom VT session, VuGen generates TE_send_text functions instead of the standard TE_type.This allows the script to handle custom escape sequences in a single step.
SSL and SSH Support for Ericom

VuGen also supports SSL/SSH record and replay for the RTE Ericom library.To work with SSL or SSH, you select the type in the Security section of the Connect dialog box.When working with SSH Security, by default VuGen opens a popup dialog box prompting you for more information. We recommend that you disable the Show options to prevent the pop-ups from being issued. If you enable these pop-ups, it may affect the replay. You can access the advanced security options by clicking the Details button.




Typing Input into a Terminal Emulator:
Two TE Vuser functions enable Vusers to "type" character input into the

PowerTerm terminal emulator:


➤ TE_type sends characters to the terminal emulator. When recording, the VuGen automatically generates TE_type functions for keyboard input to the terminal window. For details, see below.
➤ TE_typing_style determines the speed at which the Vuser types. You can manually define the typing style by inserting a TE_typing_style function into the Vuser script. For details, see "Setting the Typing Style". Alternatively, you can set the typing style by using
the run-time settings.  "Run-Time Settings".

Note: While recording an RTE Vuser script, do not use the mouse to relocate the cursor within the terminal emulator window. VuGen does not record these cursor movements.

Using the TE_type Function

When you record a script, the VuGen records all keyboard input and generates appropriate TE_type functions. During execution, TE_type functions send formatted strings to the terminal emulator.Keyboard input is defined as a regular text string (including blank spaces).

For example:
TE_type ("hello, world");
Input key names longer than one character for example, the following function depicts the input of the Return key followed by the Control and y keys:

TE_type("");

Some other examples include: , , , , .To determine a key name, record an operation on the key, and then check the recorded statement for its name.

Note: When you program a TE_type statement (rather than recording it),use the key definitions provided in the Online Function Reference (Help >Function Referenc
Setting the Timeout Value for TE_type
If a Vuser attempts to submit a TE_type statement while the system is in

X SYSTEM (or input inhibited) mode, the Vuser will wait until the
X SYSTEM mode ends before typing. If the system stays in X SYSTEM mode for more than TE_XSYSTEM_TIMEOUT milliseconds, then the TE_type function returns a TE_TIMEOUT error. You can set the value of TE_XSYSTEM_TIMEOUT by using TE_setvar. The default value for TE_XSYSTEM_TIMEOUT is 30 seconds.Allowing a Vuser to Type Ahead Under certain circumstances you may want a Vuser to submit a keystroke
even though the system is in X SYSTEM (or input inhibited) mode. For example, you may want the Vuser to press the Break key. You use the TE_ALLOW_TYPEAHEAD variable to enable the Vuser to submit a keystroke even though the system is in X SYSTEM mode.
Set TE_ALLOW_TYPEAHEAD to zero to disable typing ahead, and to any non-zero number to permit typing ahead. You use TE_setvar to set the value of TE_ALLOW_TYPEAHEAD. By default, TE_ALLOW_TYPEAHEAD is set to zero, preventing keystrokes from being sent during X SYSTEM mode. Setting the Field Demarcation Characterssome terminal emulators use demarcation characters to mark the beginning and the end of each field. These demarcation characters are not visible— appearing on the screen as spaces. In the terminal emulator shown below, the colors in the middle section of the screen have been inverted to display the field demarcation characters. These characters are surrounded by ellipses.

The TE_wait_text, TE_get_text, and TE_find_text functions operate by identifying the characters in a specified portion of the screen. If a field demarcation character is located within the specified section, you can identify the character as a space or an ASCII character. You use the TE_FIELD_CHARS system variable to specify the method of identification.

You can set TE_FIELD_CHARS to 0 or 1:

➤ 0 specifies that the character in the position of the field demarcation characters is returned as a space.
➤ 1 specifies that the character in the position of the field demarcation characters is returned as an ascii code (ascii 0 or ascii 1).By default, TE_FIELD_CHARS is set to 0.
You retrieve and set the value of TE_FIELD_CHARS by using the TE_getvar and TE_setvar functions.

No comments: