Sunday, 27 May 2012

Common Analysis Error

Error:
"Object reference not set to an instance of an object"
Sometimes we got the error "The system cannot find the file specified".

Reason:
This error comes when the following files in (Analysis Install dir)\bin\dat\ are corrupted:
loader2.mdb, loader.mdf, loader.ldf

Solution:

You need to restore these files; take these files from another machine where you have installed the Analysis. Or Re-install the Analysis on your machine after a clean uninstall. 
 
 
Problem; When controller freeze out during the load test and got crashed before stopping the test.  and when we click on analysis file we get error like "Analysis failed to analyze result directory".
 
Solution: Since .eve files are pretty huge, it would not be able to write it in the analysis results. These .eve files get generated in the Load Generator machine.
In this case we need to copy .eve files from all the Load Generator machines and put it in the analysis results.
 
Path of Eve file:
 ugdfhf1234=C:\Documents and Settings\svc-hypmmc\Local Settings\Temp\brr_YAR.409\netdir\d\loadrunner\username\result\loadtest_round1_planninguat_02apr2011\ugdfhf1234_19.eve
 

How to check the Transactions done by a Vuser in Analysis

The Analysis data pulls out the transaction data for all the vusers for your test run. If you are interested in getting data for a particular vuser then you can do that by:

Go to Transactions Summary Report, right-click on the graph and select filter.
On the filter page select VuserID filter and give a proper value or range of Vuser to get the appropriate data.You can give different Vuser by separating them with comma line 2,5 for Vuser2 and Vuser5.

If you are not sure what is the VuserIDs during your test run then click on vusers button and it will list the VuserID used during your test.

Saturday, 26 May 2012

Errors encountered while running vusers in controller regarding illegal names in script files

While running Vusers in the Controller the user receives the following errors:
Error: "82000 One or more of the script's files have illegal names. It is possible that two files are using the same name and directory."
Error: "84805 The user files were not transferred to the local load generator"
The scripts run fine on the local host but experience the above error while trying to run on a remote machine

Resolution:

Make sure that all the scripts names and parameters are unique
1. Make sure that all the scripts' names and parameters are unique. Please note that you should not create any script or parameter with a difference case. For example, "LoadRunner" or "loadrunner" will not make any difference to the Controller.
2. Make sure that the path where the script is saved does not exceed Window's maximum path length (260 characters). If it is, try to save the script in some other location with shorter path.
3. Make sure that all the parameters referencing the same parameter file use the same case for the file name/file path when it is being added to the script. If the case for the parameter file name/file path differs, it might causes problems.
4. Make sure that the "ScriptName".prm file references the parameter in the script in correct case. If not, it might cause problems.
5. Make sure that there are no spaces in the parameter file names.  Embedded spaces will work for VuGen but not for Performance Center.
6. The file name of the parameter file itself (and the path) should be the same as the Table value in the prm file.  If TableLocation is not "Local", ensure the parameter file exists in the path specified.

LoadRunner Agent Service vs Process

Few people might be wondering as to why LoadRunner agent has the option of running it as the service or as the process.

If we run it as process, the agent will be running until at least single user session logged into agent machine, whereas in case of agent as service no user needs to be login, just if the machine is up and running it is enough.

Note: Whether agent running as service or process name would be " Performance center Agent service" in services.msc
 
Below are few steps to follow to convert the agent from process to service or vice-versa

Converting Agent process to Service
1. Kill the process "magentproc.exe from Task manager
2. Open the command prompt and go to the path "%\HP\LoadRunner\bin%"(where loadrunner is installed into your machine)
3.type: magentservice.exe -install
4. go to run and type services.msc
5. look for the service "Loadrunner Agent Service" and restart the same


 
2nd method:
1.Kill the process "magentproc.exe from Task manager
2.Stop the process Performance center Agent service
3.Go to path C:\Program Files (x86)\HP\Performance Center Host\launch_service\bin\
4. run magentservice
5 Check in Task manager(magentservice.exe*32) would be running
6. Start the performance center Agent service
Now the agent would be running as service

Converting Agent Service to Process
1. Go to Services.msc and stop the loadrunner agent service
2. go to go to the path "%\HP\LoadRunner\bin%"(where loadrunner is installed into your machine)
3. type: magentservice.exe -remove
4 type magentsproc.exe

Issue in replay due to redirections

This summary is not available. Please click here to view the post.

Friday, 25 May 2012

Performance Test Questionnaire

Here I  mentioned some general performance test questionnaire that should be asked from the customer before starting the project.
Is application stable?
Is there anyone  who has run performance tests before?
Do you aware of any performance problems in the application that is experienced by the users?
What technologies have been used to develop the application?
What are the critical workflows of the application to be considered as candidates for performance testing?
Can business processes run concurrently?
What is the expected workload (number of simultaneous virtual users) to be tested?
What are the interfaces of the application? e.g., Payment gateways, web services etc.,
Briefly describe the business/domain of the application.
Is the application already in production?
Are the web server logs for the application available? Applicable only if the application is already in production.
What is the average session duration of a user? - Average time a user would be logged into the application.
What are the user distribution among all the business process?
What is an acceptable transaction response time? (please specify in number of seconds)
Please provide the test environment (Hardware and Software) configuration.
Where is the test environment setup? – Inside the Firewall in a isolated LAN environment or outside the firewall.
Do you have any specific performance objective(SLAs) for this test? E.g. 1000 Invoices to be processed in a Day
What is the protocol between the client and the server?:
Is the data repeatable?
Does the data have to be unique?
Are you currently using a monitoring tool? If so, please specify:
Does the data need to be validated?
Do users access this application locally (via a LAN) or from other sites in the world (WAN)?
Does the client application depend on any locally installed components?
Is the client browser version-dependent?

Wednesday, 23 May 2012

Common Errors between Controller and Agents

Problem:

<!--[if !supportLists]-->· <!--[endif]-->Error -29989: Process "lr_bridge.exe" was not created on remote host , reason - communication error.


Resolution:
Different problems can cause the above error. Some of the things you can verify include:
1. Make sure that you apply the same LoadRunner version and Service Pack on the Controller and Load Generator machines.

2. Make sure that you can ping the Controller and host machine bidirectionally. You may need to add the IP address and machine name on the host file:
  1. Go to the host machine.
  2. Navigate to C:\WINNT\system32\drivers\etc\.
  3. Open the hosts file in a word editor.
  4. At the end of the file, add another line with the IP address and machine name of the Controller machine.
Example:
111.111.111.111 MI_Controller
  1. Repeat steps a - d for all the host machines.
  2. Repeat steps a - d for the Controller machine, but adding the IP and machine name of the hosts machines.
3. Make sure that the LoadRunner Agent is running either as a process or a service on the remote host machine.

Try to recreate the Controller’s initialization file Sometimes, the initialization files can become corrupted (e.g. after a crashed). You will have problem in launching or using the Controller after that. Use the following steps to do delete the initialization file so that a new copy will be created:
1. Shut the Controller.
2. Navigate to the C:\Winnt ( or C:\Windows for Windows XP machine )
3. Delete all files that begin with wlrun*. For example,
wlrun.ini, wlrun5.ini, wlrun7.dft, wlrun7.hst, wlrun7.ini


Controller on windows machine and Load Generator on Linux machine
How to resolve communication error:

By default, the LoadRunner Controller uses TCP port 50500 to send data to TCP port 54345 on the Windows Load Generator. The Load Generator sends information back via a dynamic port. through the MI Listener. 

We can use verify_generator utility with Loadrunner to verify if all the needed settings are in place.




Load Runner 11.0

Here in this post I am going to describe various things that are required or need to understand with respect to Load Runner 11.0

OS that support LR 11.0
  • Windows Vista SP2 32-bit
  • Windows XP Professional SP3 32-bit
  • Windows Server 2003 Standard Edition/Enterprise Edition SP2 32-bit
  • Windows Server 2008 Standard Edition/Enterprise Edition SP2 32-bit and 64-bit
  • Windows 7
Note: VuGen recording is not supported on 64-bit operating systems.

How to download and Extract LoadRunner version 11 (LR 11)?
Navigate to the support portal: http://support.openview.hp.com/
Click on "Downloads" tab
Click on "Demos and Downloads"
Enter your HP Passport credentials when needed.
You will have visibility to LR 11 (and other) downloads, if you have support for LoadRunner 11 as part of your HP Support Agreement Identifier (SAID) — HP SAIDs can be configured in the HP Passport Profile.
Procedure to download:

Is Internet Explorer 9 supported by LR or PC 11.x ?

The base version of LR / PC 11.x doesn't support IE 9 by default; you need to contact customer support to get a patch on top of your base installation. It is known as Patch 3, once installed it will support IE9.

LoadRunner 11 applications (controller, VuGen GUIs) are slow to come up
After installing LoadRunner 11 the application UIs are very slow to be presented at sometimes.
It may take a minute or more for VuGen to be presented after it’s launched.
To resolve this slowness try the following
1. Install the latest LoadRunner 11 patches.
2. Add a proxy setting in IE / Internet Settings, if your environment uses a proxy for web/Internet access.
3. If the above does not work, open the following file in notepad :
C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
Replace empty element:
<runtime/>
with this:
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>

Correlation rules are not working in LoadRunner 11

Correlation rules are not working in LoadRunner 11
The reason why the correlation rules are not working is because the value to be correlated in the generation log in response body is in Plain text format, but when it is used in the script it is in URL format.
for instance in the generation log value is
"3,10 Feb 2011 18:50:13 -0000"
in the script the value is
"3%2C10 Feb 2011 18%3A50%3A13 -0000"
The same value "3%2C10 Feb 2011 18%3A50%3A13 -0000" is also a part of the request body, hence is not being captured.
The automatic correlation rule only handles 2 conversions for formatting as follows:
1. From HTML to URL
2. From URL to HTML
it does not handle Plain text to URL
When you do manual correlation, we are capturing the value and then using the function web_convert_param () to convert the plain text format to URL format, and hence it can be handled on the script. The correlation rules does not have the same level of flexibility as manual functions.
To fix this issue manually correlate the value.

Sunday, 13 May 2012

How to check LG is installed and enabled and How much load can generate

First of all LG and Controller are physical machine on which we installed LG software.

To check LG s/w in installed:
Go to command prompt--> Type Services.msc-->Check Performance center Agent Service--> If its status is started then LG s/w is installed.

In LG machine,in the right bottom corner you can see one small red tower icon  and if you take mouse over that it will show Performance center Agent Service.
In controller you are not able to see small red tower icon  but you can see "Performance center Agent Service" in the services.msc.

How to check version of LG on a machine

Go to control panel--> Add remove Program--> Check the version of HP performance center Host with SP1/Patch1


                                    How much load we can generate from a LG

Web vusers are hosted by a process called mmdrv.exe (check task manager when running a test, you will see it there). There is one copy of the process for each 50 vusers so a 200 user test will have 4x that process.

Each process uses about 7MB + about 350KB for each vuser (changes slightly according to version of LR, OS, size of script, logging level, recording options, day of week, whether it is raining etc)

So a 200 user test would be (4x7MB) + (200x350KB) = about 98MB, more or less. Scale up for your own requirements.

Other protocols use more memory (e.g. TruClient uses about 20MB per vuser I think)

Generally, don't go above about 70% CPU or memory usage on the load generator (monitor the LG as part of a test-the-test-system test to make sure). So work out how much free memory you have on your machine, take 70% of that value, then calculate as above.

Another method:


Firstly, identify a single Vuser footprint as follows:

  • Create a scenario in the Controller which uses your script, and set the number of iterations to 30 in the Run Time Setting. It should be configured to run until complete.
  • Using the Windows Resource Monitor, configure %Process Time and Private Bytes counters on the mdrv.exe process in order to measure the footprint. Note that in order to configure these counters, you should first run the script to have mdrv.exe running. Run the scenario just for the sake of configuring the counters and then stop and save it before initiating the real test.
  • Run the scenario and make sure the monitor data is collected
  • As soon as the scenario execution ends, analyze the results using the Analysis tool. Make sure you analyze complete data and not only summary data.
  • Open the Windows Resource graph and make a note of the average CPU and peak memory utilization.

Now, you can determine the number of Vusers per LG. You need to work out how many Vusers the CPU can sustain, and how many the memory can accommodate.

  • This formula will give you the number of Vusers the CPU can sustain:

Number of Vusers per CPU = (70% * Number of Core Processors)/ Vuser Average CPU Usage

(We recommend limiting it to 70% so as not to overuse the CPU)

  • This formula gives you the number of Vusers the memory can accommodate:

Number of Vusers by Memory = (Total GB RAM of LG – GB RAM allocated for the operating system and other processes) / Vuser Peak Memory Usage

(You might want to reserve 1GB for the OS etc)

The number of Vusers that you are looking for should be the lower of these two values.

Here’s a table with some examples:

No of Core Processors
Average CPU usage of Vuser (%)
Vusers for CPU
(70%*No of Core Processors)/Average CPU usage of Vuser
Total Assignable Memory (GB)
(Total Memory-1GB)
Peak Memory per Vuser (MB)
Vusers for Memory
(Total Assignable Memory/Peak memory per Vuser)
Lower of “Vusers per CPU” and “Vusers by Memory”
8
10
(70*8)/10=56
8-1=7
80
7GB/80MB=89
56
4
22
(70*4)/22=12
8-1=7
100
7GB/100MB=70
12
8
6
70*8/6=93
16-1=15
120
15GB/120MB=125
93

It’s not bulletproof – different scripts have different considerations and requirements, so it’s difficult to say categorically that this will work. But it should be enough to get you started.


Another view:

The mdrv.exe is a driver process which is responsible for running Vusers on your load generator. Even after LR11.xx, this process continues to be 32 bit one. So the maximum addressable space is 4GB by this process.

Running VUsers as thread has an advantage of sharing this 4 GB of space between a lot of threads. With the increase in number of users, you can see the instances of mdrv.exe increasing on your load generator to accommodate the users.





How many Java Virtual Machines (JVMs) does LoadRunner use? If the user runs 20 Java Vusers, will that use 20 JVMs or just one JVM?




Solution

JVMs are loaded per-process.If you are running the Vusers as a process, then there will be one JVM for each Vuser. If they are running as threads, there will be as many Vusers to a JVM as there are threads to the process.
Example: To run 20 Vusers in Controller:


  • If you are running 10 threads per process, there will be 2 mdrv.exe processes launch, and hence 2 JVMs.
  • If you are running 5 threads per process, there will be 4 mdrv.exe processes launch, and hence 4 JVMs.
Additional Information: 
To verify the number of processes launch, you can check the number of mdrv.exe processes using the task manager.


Wednesday, 9 May 2012

Static IP vs Dynamic IP

How to determine that your machine has a static IP
1. Type ipconfig /all at command prompt.If DHCP Enabled is "No" then machine has static IP,if it has Yes then machine has dynamic IP.

2. Open the "Local Area connection" dialog box.Then click on Support tab.If Address type is "Manually configured" then machine has static IP. and if it has "DHCP" enabled then machine has dynamic IP.

DHCP(Dynamic Host Configuration protocol).

How to Change Password of IUSR_METRO Account

Sometime we need to change the password of IUSR_METRO Account. This may be required due to compliance issue. Below are the steps to chang...