Friday, October 17, 2008

Load runner checkpoints - Text ckeck point



Load runner checkpoints
  • Some time while surfing the internet contents are not downloaded and displayed completely
  • Display of data at client machine is integral part of business process
  • To ensure that all business process have completed end to end while server handles concurrent requests, we need content checks


  • Load runner provides 2 types of check points
o       Text check
o       Image check


  These check points we can add during or after recording the script. These check   point’s stores the expected value. Compare the actual value on the web page to   the expected value during play back and report the comparison results status as   either pass or fail.



For doing text check point i am using already recorded script (Flight reservation)



   Note: Navigation for task pane : view > Tasks


  Click on the content checks link. 










  To insert a text check we need to select particular thumbnail .I will click    on reservations.pl thumbnail.











  To insert text check select Flight departing text in page view and press right  click and choose add a text check(web_reg_find) option.







Most of the times Loadrunner can not allowed to place a checkpoint like this.it will give error message





  Next way is click on the server response tab> click html document> body    node  > flight selection  












  Select Flight departing text and press right click and choose add a text  check(web_reg_find) option. 



Text checkpoint box will appear. And than click ok.










Text point function will be inserted.we can view text check point in tree view. 




And also we can view text check point function in script by sclicking script view icon.




putting Text check point is over.now run the script and we can find out weather the text point succedded or not by verifying replay log.


we can find out "Registering web_reg_find was successful" in the replay log. It means the text check point verified successfully. :)












  In the next artical we will learn about :


     > Image check point
     > various text check pont conditions
     > tips & tricks




Plz post ur valuable Suggestions to testingblog4u@gmail.com :)
















Sunday, October 12, 2008

Correlatio Part -3 Find session value using scan script for correlation button

Find session value/unique using value using scan script for correlation button
In previous lession we came to know how to find session value using windiff tool :)
Today we will learn how to use scan script for correlation button for finding session value and how to do correlation (will be done automatically using correlation studio).

Steps to follow to do ...... :)

1.After recording if we want to find session value we can use scan script for correlation button or use short cut keys (ctrl+F8) 

Note: We must have to run (F5) script at least one before find correlation.
For doing correlation press correlate button. After pressing correlate button correlation function will be insert in the script.

After clicking scan script for correlation button diffrences will be shown in two windows.
Top one is recorded and bottom window is replay window.
and we can get session value.
For doing correlation press Correlate button.

After clicking correlate button the session value will be correlated and correlation function will be generated automatically in the script which function will require.



Script will be like  :



// [WCSPARAM WCSParam_Diff1 43 99136.2110976104fAQQDVipifiDDDDDDAfQfpQVDVf] Parameter {WCSParam_Diff1} created by Correlation Studio

web_reg_save_param("WCSParam_Diff1",
                    "LB=userSession value=",
                    "RB=>",
                    "Ord=1",
                    "RelFrameId=1",
                    "Search=Body",
                    "IgnoreRedirections=Yes",
                    LAST);  


In next lession we will learn how to do manual correlation & how to create correlation rules.
plz post your your valuable comments to  ->     testingblog4u@gmail.com






Saturday, October 11, 2008

Loadrunner Correlation Part –2: how to do find unique/sessionId


What is Windiff tool?How to use Windiff tool?


Hi, Today i am going to explain how to do find unique/session value using Windiff tool in Loadrunner.

We can find out unique/session value using Wdiff tool in VUGen.

To use Wdiff tool we need to record the same script twice. Then, the values that should be correlated can be determined by using Win diff.

Note: Additional software which helps comparing two recorded scripts is “WinMerge” 


It can be downloaded for free from http://winmerge.org/downloads/index.php

Steps to perform Wdiff process:

1.Record two copies of the script with the same busines process and  data:       

   a. Record a script on the desired business process and save it.

   b.Record another copy of the script, repeating all the steps as in step 1a. As much as possible, during recording, enter the same values in both scripts, for example, user ID, password, and fields and edit selections.  

2.Identify the values to correlate with the help of the WinDiff tool

a.From the second script, go to Tools ® Compare with Vuser, and choose the first recorded script. 

b.WinDiff will open and display the two scripts side by side.  It will automatically highlight the lines with differences in them, showing the differences in red. (If not, go to Options ® View ® Show inline differences.)

c.Locate the first difference, take note of it, and search the script open in VuGen for that difference.  That is the original value hard-coded into the script that was different in the second script.  Highlight it and copy it.



Some times we will get the following problem.
It happens if your script directory contains spaces or special characters.


Other wise we can get windiff window.using this difference window we can get two script diffrencess.

                                     (For lagrge image... click on the image)

Note: Differences like "lr_think_time" can be ignored.  They are pacing functions, and do not represent data sent to the server.

We can get the unique/session value in win diff window.

we will learn how to do manual correlation using found session/unique value.  :)

 

Thursday, October 9, 2008

Loadrunner - IP Spoofing

When you run a scenario, the Vusers on each host machine use the host’s IP address. You can define multiple IP addresses on a host machine to emulate a real- life situation where users sit on different machines.



About Multiple IP Addresses
Application servers and network devices use IP addresses to identify clients. The application server often caches information about clients coming from the same machine. Network routers try to cache source and destination information to optimize throughput. If many users have the same IP address, both the server and the routers try to optimize. Since Vusers on the same host machine have the same IP address, server and router optimizations do not reflect real- life situations.



LoadRunner’s multiple IP address feature enables Vusers running on a single machine to be identified by many IP addresses. The server and router recognize the Vusers as coming from different machines and as a result, the testing environment is more realistic.

Adding IP Addresses to a Host

LoadRunner includes an IP Wizard program that you run on each host machine to create multiple IP addresses. You add new IP addresses to a machine once and use the addresses for all scenarios.



The following procedure summarizes how to add new IP addresses to a host:
1 Run the IP Wizard on the host machine to add a specified number of IP addresses.

2 Re- start the host machine.

3 Update the server’s routing table with the new addresses, if necessary.
4 Enable this feature from the Controller.
Refer to see Enabling Multiple IP Addressing from the Controller
Using the IP Wizard:
The IP Wizard resides on each host machine. You run this process one time to create and save new IP addresses. The new addresses can be a range of addresses defined by the Internet Assignment Numbers Authority. They are for internal use only, and cannot connect to the internet. This range of addresses are

the default used by the IP Wizard.

To add new IP addresses to a host machine:

1 Invoke the IP Wizard from the LoadRunner program group.


2 If you have an existing file with IP address settings, select Load settings from file and choose the file.

3 If you are defining new settings, select New Settings .

4 Click Next to proceed to the next step. If you have more than one network card,choose the card to use for IP addresses and click Next .The optional Web server IP address step enables the IP Wizard to check the server’s routing table to see if it requires updating after the new IP addresses are added to the host.


5 To check the server’s routing table directly after adding the addresses, enter the server IP address. 
6 Click Next to see a list of the machine’s IP address(es). Click Add to define the range of addresses. 

IP addresses include two components, a netid and hostid. The submask determines where the netid portion of the address stops and where the hostid begins.



7 Select a class that represents the correct submask for the machine’s IP addresses.8 Specify the number of addresses to create. Select Verify that  new IP addresses are not already in use to instruct the IP Wizard to check the new addresses. If some addresses are in use, the IP Wizard will only add the addresses not in use.
9 Click OK to proceed.

After the IP Wizard creates the new addresses, the summary dialog box lists all of the IP addresses.


10 Click Finish to exit the IP Wizard. The IP Wizard Summary dialog box is dispalyed.




Wednesday, October 8, 2008

Loadrunner Correlation Part - 1

Loadrunner Correlation:

VuGen, when recording a script, simply listens to the client (browser) talking to the server (Web server) and writes it all down. The complete transcript of everything that was said, the dates and time, content, requests, and replies can be found in the Recording Log (for Single Protocol) or Generation Log (for Multiple Protocol). The script is an easier to read version of this. The main difference is that the script only contains the client’s communication.

If you imagine that VuGen is an impersonator pretending to be the client (browser), the script tells VuGen what to say to the server to successfully fool it. You want the server to believe that VuGen is a real client, and thus send it the requested information.

This script has the hard-coded information of the original conversation (Browser session) that occurred between the client and server. This hard coded information may not be enough to fool the server during replay however; it may have to be correlated.

What is correlation:

Correlation is where the script is modified so that some of the hard-coded values in the script are no longer hard-coded. Rather then sending the original value to the server, we may need to send different values.

For example, the original recorded script may have included the server sending the client a session identification number, something to identify the client during that particular session. This Session ID was hard-coded into the script during recording.

During replay, the server will send the client a new Session ID. You need to capture this value, and incorporate it into the script so you can send it back to the server to correctly identify yourself for this new session. If you leave the script unmodified, you will send the old hard-coded Session ID to the server. The server will look at it and think it invalid or unknown, and so will not send the pages that have been requested. Replaying a script with an old Session ID will not successfully fool the server into believing it is a client.

Correlation is the capturing of dynamic values passed from the server to the client and back. You save this captured value into a parameter, and then use this parameter in the script in place of the original value. During replay, the replay engine will now listen to what the server sends to it, and when it makes requests of the server, send this new, valid value back to the server; thus fooling the server into believing it is talking to a real client.

Why do I have to correlate?

If you try to replay a script without correlating first, the script will most likely fail. The server will not reply to the requests it sends. Either the Session ID is invalid so the server will not allow you into the site, or it will not allow you to create new records because they are the same as existing ones, or the server will not understand your request because it is not what it is expecting.

The following diagram illustrates a typical example where correlation is required. While recording, the client request for page A with the ID “123.” This information (123) will be intercepted by the Web recorder and placed as a hard-coded value in the script. During replay, even though the ID is supposed to be “456,” the Web Vuser sends “123” to the server causing a replay failure. You will need to correlate this value so that the correct data is sent to the server.

What errors mean I have to correlate?

There are no specific errors that are associated with correlation, but there are errors that could occur because a value has not been correlated. For example, if an invalid Session ID is sent to a Web server, how that server responds depends on the implementation of that server. It might send a page specifically stating the Session ID is invalid and ask you to log in again. It might send an HTTP 404 Page not found error because the requesting user did not have permissions for the specified page, and so the server could not find the page.

In general, any error message returned from the server after the script makes a request that complains about permissions can point to a hard-coded value that needs to be correlated.

Functions for correlation:

web_reg_save_param: This is the latest function with some extra features for a more powerful usage.

The syntax is as following:

web_reg_save_param ( “Parameter Name” , , LAST );



Each of these parameters is a pointer to a string. That means that if they are entered as literal text, they need to be enclosed in quotes, with each parameter separated by a comma. The supported attributes include LB (Left boundary), RB (Right boundary), RelFrameID, ORD, Search, SaveOffset, SaveLen, and Convert. These attributes can appear in any order because they contain within them what they are. Detail information about each attribute can be found on the function reference online.

Web_create_html_param,Web_create_html_param_ex : Both of these functions are for backward compatibility only. It is recommended that you use the web_reg_save_param function. If you need to use this function for some reason, please refer to the function help reference.

Document Ref: HP loadrunner correlation

This post explains... what is correlation,why do we have to do correlation,what errors mean we have to correlate :)

Future posts :

1.how to do find unique/session value

2.correlation studio

3.Correlation rules

4.manual & auto correlation

5.Tips & Tricks




Sunday, October 5, 2008

Pre-Load test check lists

Before starting loadtest we have to make sure the following check lists: :)

1.End users, customer, and project members have been notified in advance of the execution dates and hours for the capacity test
2.All service level agreements, response time requirements have been agreed upon by all stakeholders.
3.Contact list with names and phone numbers has been drafted for support personnel (onsite and remote)
4.Functional Testing of the application has been completed.
5.Restart the controller machine.
6.Ramp Up / Duration / Ramp Down is configured correctly.
7.All Load Generators are in a "Ready" status.
8.All Load Generators are assigned to appropriate scripts.
9.All scripts have the correct number of Vusers assigned to them.
10.All scripts have the correct number of Iterations assigned to them.
11.Correct pacing has been agreed upon and configured for all appropriate scripts.
12.Logging is set to Send messages only when an error occurs for all scripts.
13.Think Times have been enabled/disabled in the test scripts
14.Generate snapshot on error is enabled for all appropriate scripts.
15.Timeout values have been set to the appropriate values.
16.All content checks have been updated for the appropriate scripts.
17.Rendezvous points have been enabled/disabled for appropriate scripts
18.All necessary data has been prepared/staged and is updated in all scripts.
19.Any scripts with unique data requirements have been verified.
20.All scripts have been refreshed in the controller and reflect the most recent updates.
21.IP Spoofing has been enabled in the controller.
22.IP Spoofing has been configured on all appropriate Load Generators.
23.All LoadRunner Monitors have been identified, configured and tested.
24.Auto Collate Results should be enabled
25.Results directory and file name should be updated.

Performance Testing News:

Loadrunner v12:
- Targeting an April 2012 Development release. Not sure when it will be available for public.
- Customers can participate in the beta program after legal procedures are completed.
- Availability of LR Mobile protocol. Performance testing for mobile (both web browser based as well as native mobile device) – Supports HP Palm Pre, iPhone (3GS, 4), Android, Blackberry phones and many other actual mobile devices.
- Support for Windows7, TruClient IE9.
- VUGen will be completely redesigned and new IDE (called Sharp Develop) will be built.

Performance Testing,Monitoing & Analysis Useful Documents

Download Performance Testing,Monitoing & Analysis Useful Documents


Loadrunner

Design scenario - Download

Record & Replay Issues with VUGen - Download

LR8.1 Protocol Footprint - Download

Monitoring & Analysis

HP Performance monitoring best practice - Download

Others

Load test plan - Download