Friday 4 September 2015

RTE Protocol Scripting in LR

 RTE Protocol Scripting in LR


Purpose

·         RTE Vusers operate terminal emulators in order to load test client/server systems.
·         You record a terminal emulator session with VuGen to represent a true user's actions. You can then enhance your recorded script with transaction and synchronization functions.
·         The RTE protocol works like when you are sending data to server it would send one character by character to DB.   so when you are increasing the Load the Database can take at one time one character for each user. so give more te wait time and increase the load gradually instead of simultaneous users.  If your are working on RTE means u are working on Mainframe or oracle forms application

Introduction

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 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.
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.

Scripting Approach

Vugen can be used to record windows based Vuser scripts. VuGen uses the PowerTerm terminal emulator to emulate a wide variety of terminal types
This task includes the following:
 

Record the Terminal Setup and Connection

·         Open an existing RTE Vuser script, or create a new one.
 
·         In the Sections box, select the vuser_init section to insert the recorded statements.
·         In the Vuser script, place the cursor at the location where you want to begin recording.
·         Click the Start Record button. The PowerTerm main window opens.
·         From the PowerTerm menu bar, select Terminal > Setup to display the
·         Select the type of emulation from the VT Terminal and IBM Terminal types, and then click OK.
Note: Select an IBM terminal type to connect to an AS/400 machine or an IBM mainframe; select a VT terminal type to connect to a UNIX workstation.
·         Select Communication > Connect to display the Connect dialog box.
·         Under Session Type, select the type of communication to use.
·         For Terminal type 3270 Display, choose Terminal Type: 3270 Display, it will automatically set the default settings like session type, Terminal ID, and Port number according to your terminal type value, also you can change them according to your need.
·         Enter Host Name , which is given in Test Plan.
·         Click on Connect, it will connect to the server then follow the business flow given in test plan.
·         For VT terminals select the following options
·         Under Session Type, select the type of communication to use.
·         Under Parameters, specify the required options. The available parameters vary depending on the type of session that you select. For details on the parameters, click Help.
·         Click Connect. PowerTerm connects to the specified system, and VuGen inserts a TE_connect function into the script, at the insertion point.
·         The TE_connect statement has the following form:
·         The inserted TE_connect statement is followed by an if statement that checks whether or not the TE_connect function succeeds during replay.
·         Note: Do not record more than one connection to a server (TE_connect) in a Vuser script.
·         The terminal setup and connection procedure is complete. You are now ready to begin recording typical user actions into the Vuser script, as described below

Record typical user actions

After recording the setup procedure, you perform typical user actions or business processes. You record these processes into the Actions section of the Vuser script. Only the Actions section of a Vuser script is repeated when you run multiple iterations of the script. When recording a session, VuGen records the text strokes and not the text. Therefore, it is not recommended that you copy and paste commands into the PowerTerm window—instead, type them in directly.
  • Select the Actions section in the Section box.
  • Proceed to perform typical user actions in the terminal emulator.
VuGen generates the appropriate statements, and inserts them into the Vuser script while you type. If necessary, you can edit the recorded statements while you record the script.
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.
For example, the following function depicts the input of the Return key followed by the Control and y keys:
TE_type("<kReturn><kControl-y>");
Some other examples include: <kF1>, <kUp>, <kF10>, <kHelp>, <kTab>.
To determine a key name, record an operation on the key, and then check the recorded statement for its name.
Note: When navigating through application flow and have to input F13 or F14 function keys which are not available on your keyboard then use following key combinations
SHIFT+F1 for F13
SHIFT+F2 for F14
SHIFT+F3 for F15

Record the log-off procedure

  • Make sure that you have performed and recorded the typical user actions as described in the previous section.
  • In the VuGen main window, click vuser_end in the Section box.
  • Perform the log off procedure. VuGen records the procedure into the vuser_end section of the script.
  • Click Stop Recording on the Recording toolbar. The main VuGen window displays all the recorded statements.
  • Click Save to save the recorded session. After recording a script, you can manually edit it in VuGen’s main window.

Recording Options

You can set the recording options to match the character set used during terminal emulation. The default character set is ANSI. For Kanji and other multi-byte platforms, you can specify DBCS (Double-byte Character Set).
By setting the recording options, you can customize the code that VuGen generates for RTE functions. You use the Recording Options dialog box to set the recording options

 

RTE Functions and Enhancing Vuser script

Following main functions can be used to enhance script.
1.       TE_Connect : Connects the terminal emulator to the specified host. (Windows only)
Note 1: The TE_connect function must always be recorded into a script. Do not type or paste the function into a script. When you record a connection, PowerTerm creates various files in the script directory. These files contain various settings that describe the connection.
Note 2: Do not include more than one TE_connect statement in a script. The second TE_connect statement will fail with an "already connected" error.
Note 3: The TE_connect function must always be the first function in the vuser_init section of the script
2.       TE_find_text : Searches for text in the designated area of the terminal emulator screen
3.       TE_get_line_attribute : Returns information about text formatting.
4.       TE_get_text_line : Reads the text from the designated line in the terminal emulator screen.
5.       TE_get_cursor_pos :  Returns the current location of the cursor. 
6.       TE_set_cursor_pos : Sets the position of the cursor on the terminal screen.
7.       TE_getvar : Returns the value of an RTE system variable. 
8.       TE_setvar : Sets the value of an RTE system variable. 
9.        TE_perror : Prints an error code to the LoadRunner output window or Business Process Monitor agent log. 
10.    TE_sperror : Translates an error code into a string. 
11.    TE_send_text : Sends a null-terminated string to a VT terminal emulator. 
12.    TE_type : Sends a formatted string to the client application. 
13.    TE_typing_style : Determines the way text is typed into the terminal emulator. 
14.    TE_unlock_keyboard : Unlocks the keyboard of a mainframe terminal 
15.    TE_wait_cursor : Waits for the cursor to appear at a specified location in the terminal window. 
16.    TE_wait_silent : Waits for the client application to be silent for a specified number of seconds
17.    TE_wait_sync : Waits for the system to return from X-SYSTEM or Input Inhibited mode. 
18.    TE_wait_sync_transaction : Records the time that the system remained in the most recent X SYSTEM mode. 
19.    TE_wait_text : Waits for a string to appear in a designated location.

Correlation

Best simple way of correlation in RTE scripts to use TE_get_text_line function. Insert this statement at the location in script where the page having the required value will appear, Insert this function just after that to capture the value/Text at the specified location.
This value then can be passed in subsequent request wherever it’s needed
The following statement reads five characters of text from the 12th row and 20th column of the screen.
Char buf[50];
TE_get_text_line ( 20, 12, 5, buf);

RTE Synchronization

Depending on the system you are testing, you may need to synchronize the input that a Vuser sends to a terminal emulator with the subsequent responses from the server. When you synchronize input, you instruct the Vuser to suspend script execution and wait for a cue from the system, before the Vuser performs its next action. For instance, suppose that a human user wants to submit the following sequence of key strokes to a bank application:
·         Synchronizing Block-Mode (IBM) Terminals
·         Synchronizing Character-Mode (VT) Terminals

Synchronizing Block-Mode (IBM) Terminals

The TE_wait_sync function is used for synchronization RTE Vusers operating block-mode (IBM) terminals. Block-mode terminals display the "X SYSTEM" message to indicate that the system is in Input Inhibited mode. When a system is in the Input Inhibited mode no typing can take place because the terminal emulator is waiting for a transfer of data from the server.
When you record a script on a block-mode terminal, by default, VuGen generates and inserts a TE_wait_sync function into the script each time the "X SYSTEM" message appears. You use VuGen's recording options to specify whether or not VuGen should automatically insert TE_wait_sync functions.
When you run a Vuser script, the TE_wait_sync function checks if the system is in the X SYSTEM mode. If the system is in the X SYSTEM mode, the TE_wait_sync function suspends script execution. When the "X SYSTEM" message is removed from the screen, script execution continues.

Synchronizing Character-Mode (VT) Terminals

There are three types of synchronization that you can use for character-mode (VT) terminals
1.       Waiting for the Cursor to Appear at a Specific Location :
TE_wait_cursor function instructs a Vuser to suspend script execution until the cursor appears at a specified location on the screen. The appearance of the cursor at the specified location means that the application is ready to accept the next input from the terminal emulator.
2.       Waiting for Text to Appear on the Screen :
Text synchronization uses the TE_wait_text function. During script execution, the TE_wait_text function suspends script execution and waits for a specific string to appear in the terminal window before continuing with script execution. Text synchronization is useful with those applications in which the cursor does not consistently appear in a predefined area on the screen.
3.       Waiting for the Terminal to be Silent :
TE_wait_silent function to instruct a script to wait for the terminal to be silent. You specify the period for which the terminal must be silent. If the terminal is silent for the specified period, then the TE_wait_silent function assumes that the application has stopped printing text to the terminal screen, and that the screen has stabilized
Note: Use silent synchronization only when neither cursor synchronization nor text synchronization are effective.

Run-Time Settings

Run time settings of RTE protocol can be set through RTE node in the Run-Time settings
 Challenges
The following challenges are to be noted during RTE recording
·  As RTE protocol scripts records only key strokes so it demands knowledge of C language and good scripting skills to correlation and do error handling in script
·  Details of Terminal and Host
·  Knowledge of how to correlate and Parameterize in RTE scripts
·  Must have error handling in script by capturing data and text by RTE functions to avoid the script to go in failed state during the test.


LoadRunner Training in Bangalore
LoadRunner Training in Hyderabad
LoadRunner Online Training
LoadRunner Training in BTM
LoadRunner Training in Marathahalli
Best LoadRunner Training Institutes in Bangalore 
Best LoadRunner Training Institutes in India
Training Institutes in Bangalore

CONTACT:
8050148265
techvision.lr@gmail.com

1 comment:

  1. Betway Casino Sports Betting Odds - Online Gaming
    Betway Mobile Casino - Online Gaming. Betway air jordan 18 retro toro mens sneakers for sale Mobile Casino. where can i buy air jordan 18 retro red Betway Mobile Casino. Betway Mobile Casino. betway Mobile 7 포커 족보 Casino. Betway Mobile jordan 18 white royal blue shipping Casino. authentic air jordan 18 retro varsity red Betway Mobile

    ReplyDelete