Thursday, June 25, 2015

SIEBEL PROTOCOL SCRIPTING USING LOADRUNNER


Preparation before record – Internet Explorer Settings
To avoid problems, verify the following Internet Explorer’s settings before you proceed to record:
  1. Enable all ActiveX controls and plug-ins. This option is available in Internet Explorer > Tools > Internet Options > Security > Custom Level.
  2. Enable the “Use HTTP 1.1 through proxy connection” option. This option is available in Internet Explorer > Tools > Internet Options > Advanced, under the “HTTP 1.1 settings” radio button.
Recording Siebel script with Auto-Correlation option
For Siebel script, you can instruct VuGen to automatically apply correlation during recording using one of the following methods:
· VuGen Native Siebel Correlation
The native, built-in rules, work on a low level, allowing you to debug your script and understand the correlations in depth.
· Siebel Correlation Library
The Siebel correlation library automatically correlates most of the dynamic values, creating a concise script that you can replay easily. Note that this is only available for Siebel 7.7 and the library is distributed by Siebel.
How to record with VuGen Native Siebel Correlation
VuGen’s native built-in rules for the Siebel server detect the Siebel server variables and strings, automatically saving them for use at a later point within the script. It is available in VuGen recording option by default; you do not need to have any additional components installed.

Steps to record with Native Siebel correlation:
  1. From the ‘New Multiple Protocol Script’ window, add ‘Siebel-Web’ and click OK.
  2. Set the following Recording Options:
    • Internet Protocol: Recording:
      • Select ‘ HTML based script
      • Click on ‘HTML Advanced’ and select the following
        • Script Type: a script containing explicit URLs only
        • Non HTML-generated elements: Do not record
    • Internet Protocol: Advanced:
      • Clear the ‘Reset context for each action’ option.
      • Select ‘Support Charset’ then select ‘UTF-8’
    • Internet Protocol: Correlation:
      • Make sure that you have ‘Enable Correlation during recording’
      • Make sure that ‘Siebel’ is selected. You can expand the list to see the details about each rule if you wish.
    • Leave other options as default.

Challenges Faced
Error: “We detected an Error which may have occurred for one or more of the following reasons: We are unable to process your request. This is most likely because you used the browser BACK or REFRESH button to get to this point.”

Diagnosis: A HTTP request has been sent twice to the server. This could be an individual web_url request or part of the resources being downloaded from another request. When sending the second request to the server, the Siebel 7.x server detects multiple requests and thus, issues the above error.

Solution:
1. Change the Mode in earlier call from "Mode=HTML" to “Mode=HTTP”
The idea behind changing the mode from HTML to HTTP is to avoid parsing the HTML page that is returned by the server, so that resources are not downloaded. This helps to avoid multiple downloads of same request.

2. Disable the Run-Time Viewer:
If the script still fails on the first iteration after the change from step 1, try after closing the Run-Time Viewer.

3. Correlate SWECount or SWEC
If you are able to run the first iteration, but the script fails on the second iteration or onwards, you will need to correlate SWECount (7.0.3) or SWEC (7.0.4) from the previous step “start.sweXXX.”

4. Run the script with the extended log
If none of the above helps, replay the script with the extended log and identify the HTTP request that is being downloaded multiple times. Search for a similar HTTP Request being sent earlier in the execution log. Once you locate the same, set “Mode=HTTP” so that the resources for that request are not downloaded, and try replaying the script again.

SCRIPTING WITH RTE PROTOCOL USING LOADRUNNER

Introduction:
RTE protocol is used to record mainframe applications.
RTE Vuser does the following activities:
Types character input into terminal emulator, submits the data to a server, and then waits for the server to respond.

Purpose:

  • We 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.
  • RTE Vusers operate terminal emulators in order to load test client/server systems.
  • The RTE protocol works like when you are sending data to server it would send one character by character to DB.

Script Recording:
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:
How to Connect to the Application Manually:
  1. Click on the 3270 session icon on desktop.
  2. Choose Default 3270 and Click on the Connect Button.
  3. Enter Application id: ims0 as shown in the screen shot and press CTRL key. In mainframe applications CTRL key is pressed instead of ENTER. The CTRL key works same as like ENTER key in mainframe applications.
  4. Perform other steps of scenarios.
Actual Script Recording in RTE Protocol:
  1. Open the Vugen > Click on the New Script And Solution > Select RTE(Remote Terminal Emulator).
  2. After Clicking on the create button, Click on the Record button to start recording of the script.
  3. Now the actual recording starts here, Click on the Communication menu and in that Connect option.
  4. Enter Hostname, Terminal Type, Terminal ID and Click on Connect button to connect to the application.
  5. Once Connect button is clicked, the next steps are same as connecting manually to application.
Parameterization and Correlation in RTE Scripts:
The Parameterization in RTE is same as in HTTP/HTML protocol and the simple way of correlation in RTE scripts is to use TE_wait_text function. This function waits for a string to appear in a designated location.

TE_wait_text( const char *pattern, int timeout , int col1, int row1, int col2, int row2);
TE_wait_text function has five parameters.
1st parameter: The text you have to search on the screen.
2nd Parameter: The Timeout value in seconds to search the specified text on the screen
3rd   and   4th Parameter: The column and row coordinates of the top left corner of the area at which to wait for the string
5th and 6th Parameter: The column and row coordinates of the lower right corner of the area at which to wait for the string.
Example: TE_wait_text ("D010V00", 30, 74, 1, 80, 1);


TE_wait_cursor (int col, int row, int stable, int timeout);
1st parameter: The desired column of the cursor.
2nd parameter: The desired row of the cursor.
3rd parameter: The time (in milliseconds) that the cursor must remain at the specified location.
4th parameter:  The time to wait for the cursor to stabilize
Example: TE_wait_cursor(1, 11, 100, 90);

Sample Script:



Scripting Challenges in RTE:
The following were the challenges noted during RTE recording:
  1. Details of Terminal and Host. 
  2. As RTE protocol scripts record only key strokes, as a result it demands good scripting skills and knowledge of correlation and error handling in scripts.
  3. Knowledge of how to correlate and parameterize in RTE scripts.

Monday, June 15, 2015

Performance Test Execution from Global Location

Centralized Testing team member should follow below steps to execute Performance test scripts from Global location.

Ø  Identify Global locations from Project team.

Ø  Determine SLA for each transaction in terms of response time.

Ø  There are 2 ways to simulate virtual user load from Global locations.

1.    Install Load generators on different locations. :-  
·         Identify Person from project team to install load generator.
·         Identify machine having local admin access.
·         Transfer Load generator setup.
Advantages: -
·         Performance test results are more realistic and simulate real world scenario.
Disadvantages:-
·         Setup takes more time.
·     Running multiple users on remote generators harm production network bandwidth & users outside BASE Location face network performance issue.

2.    Simulate location bandwidth with in BASE solution center.
·      Contact Network team at least one week in advance and notify them that Centralized testing team is planning to run Performance test from Global location and require help from network team to simulate Latency for global locations.
·         Provide list of Global locations to network team.
·         Provide schedule to Network team so that they can setup latency well in advance.
·         Provide 2 generators IP address to network team.
Advantages: -
·         Setup is very easy and fits in tight project schedule.
·         Running performance test will not impact Production network bandwidth.
Disadvantages:-
·         As we are simulating latency in solution lab there might be minor deviation in Performance test results from actual user experience.

Ø  Execute the test.


Ø  Once test is over notify Network team to remove latency from generators.

How to Setup Latency

1. 
2. 
3. 


To set custom latency settings, type “custom”
It will prompt you for bandwidth, type 1544
For latency, type the desired delay in milliseconds
And use .1% packet loss (type .1).