Saturday, 2 June 2012

VuGen hangs when trying to create parameters

VuGen hangs when trying to create parameters
When trying to create a new parameter in VuGen, the CPU utilization for VuGen.exe goes up to 100% and stays there eventually causing VuGen to crash.
Diagnosis: The ss32x25.ocx file was not registered on the machine.

Solution
Register the ss32x25.ocx file on the VuGen machine.
1. Check if ss32x25.ocx exists in C:\WINNT\system32 or C:\windows\system32 where it is copied to during the LR/VuGen installation.
2. Check the version of the .ocx file, and confirm it is 2.5.0.20.
Note:
If the file is not present or the version is a lower one, copy it from a working LoadRunner machine, or, it can be found in the LoadRunner installation DVD, under this folder:
lrunner\MSI\setup_j\register
3. Register the ss32x25.ocx file using regsvr32.
Use the regsvr32 command to register or unregister a DLL

To register a DLL or OCX file
Method 1:
1. Open a DOS window.
2. Navigate to the DLL’s or OCX’s directory.
3. Enter regsvr32.exe <filename>.<dll/ocx>
Example:
regsvr32.exe mylibrary.dll
Method 2:
1. Go to Start -> Run and enter regsvr32.
2. Open Windows Explorer and find the file.
3. Drag the file from the Windows Explorer window into the Run dialog window. This will enter the full path to the DLL or OCX file.
4. Click <OK>
Example:
regsvr32.exe "c:program filesMercurymylibrary.dll"

To unregister a DLL or OCX file
Method 1:
1. Open a DOS window.
2. Navigate to the DLL’s or the OCX’s directory.
3. Enter regsvr32.exe /u <filename>.<dll/ocx>
Example:
regsvr32.exe /u mylibrary.dll
Method 2:
1. Go to Start -> Run and enter regsvr32 /u.
2. Open Windows Explorer and find the file.
3. Drag the file from the Windows Explorer window into the Run dialog window. This will enter the full path to the DLL or OCX file.
4. Click <OK>

How to automatically record web_reg_find for webpage titles

Recording web_reg_find for webpage titles
You can enable this option from Tools -> Recording Options -> Advanced tab, where it creates additional two new checkboxes.

1. Generate the web_reg_find function for webpage titles.
This will record a web_reg_find() statement with the title of the first (recorded) page of the request.
2. Generate the web_reg_find function for subframes.
This will record will a web_reg_find() statement for subframes.

The defaults for the above settings are not selected. You need to select the settings so that VuGen can automatically record the web_reg_find function.

Good practices for creating scripts in VuGen

In order to have a vugen script properly created, is necessary to ensure no errors or warnings are present, there are few other steps to complete to be able to consider that the script is properly developed.

Solution
This is a recommended checklist of the steps that should be complete for a script creation.
Note that this checklist has some items that only apply to web-based scripts and is optional to follow,

* All values that should be correlated have been correlated.
* Text checks (using web_reg_find) have been added before each web_url and web_submit_data function.
* ContentCheck Rules have been added for all known error messages.
* All server requests (web_url, web_submit_data) are being measured with a transaction (lr_start_transaction, lr_end_transaction, lr_set_transaction).
* Script runs without causing errors, and any warnings are due to legitimate reasons (e.g. download filters).
* File-based parameters have the correct “select next row” and “update value on” settings.
* Correct runtime settings have been set. This means:
o Action blocks have been weighted with correct percentages in Run Logic.
o Pacing intervals have been set to the correct value that will achieve target throughput with the given number of vusers.
o Full logging has been disabled, and size of “send messages only when an error occurs” lgo cache has been increased.
o Think time set to replay as a random percentage, and think time values in script are not ridiculously large. No think time inside transactions.
o Any needed download filters have been set.
o All other runtime settings have been set as per internal standards.



How can we make assure that all requests and responses are captured by loadrunner while recording?

You can use fiddler or any other web debug tools like http analyzer, charles proxy etc. and navigate the flow and save fiddler logs.

Record the same flow using Vugen and compare the requests in Vugen with Fiddler logs any thing extra in fiddler can be added in Vugen as request.
 
IMPORTANT - Make sure you clear the browser cache before executing the flow on fiddler and Vugen as the request entry would be skipped in Vugen if request is fetched from Browser cache.

Controller shows error executing scripts with large parameter files

When running an scenario the following message comes
Error: Exception was raised when calling event-notify Vuser function in extension parameng.dll: System Exceptions: EXCEPTION_ACCESS_VIOLATION
The error doesn’t come from vugen.
Cause
Controller doesn’t support parameter files larger than 20 megs.
Fix
Contact support and request the private patch created for this problem for LoadRunner 9.5.2, For LoadRunner 11 the issue is resolved on patch 4.

Debugging steps for issues about Virtual User Generator (VuGen)

If VuGen crashes intermediately or shows abnormal behavior, verify/try the following:

Try to login to the machine as a local administrator

Try to log in as a local administrator rather than user who is currently logged in. If this helps resolve the issue of VuGen crashing this would indicate that the cause of the problem is privileges of this particular user who is logged in. Check with your System Administrator on what privileges can/cannot be added to this user.

Make sure that there are sufficient Disk Space

Make sure that you have enough disk space available on the VuGen. If the machine does not have enough disk space, it can cause problem.

Try to recreate the VuGen’s initialization file

Sometimes, the initialization files can become corrupted (e.g. after a crashed). You will have problem in launching or using the VuGen after that. Use the following steps to do delete the initialization file so that a new copy will be created:
1. Shut the VuGen.
2. Navigate to the C:Winnt ( or C:Windows for Windows XP machine )
3. Delete the file named vugen.ini.

Check the temporary environment variables

Unlike the earlier window’s versions, Window 2000 and Window XP have the default environment set to c:Document and Settings<user-name>Local SettingsTemp instead of c:Windowstemp. This long path with a space can cause several problems on LoadRunner. To resolve the issue, change to a directory without empty spaces.

Verify the MDAC version

Make sure that you have MDAC 2.6 or higher installed.
Check the version of the MSADCO.DLL file:
  1. Browse to C:\Program Files\Common Files\System\MSADC
  2. Riight click on the MSADCO.DLL Choose Properties
  3. Click the Version tabThe File Name Version will indicate what version you are using.

    NOTE: You can right click on any of the .DLL files in the MSADC directory and they should all display the same version information.

Reboot

When programs crash, they leave the system in an unstable state. This can cause many other problems that seem to have no apparent reason for happening or has not happened before. When the system is rebooted, it resets the system into a more stable state. This should be done after any program crashes.

Shut down all unnecessary processes

Some programs are designed to have certain DLLs "hook" or be loaded into another program’s memory space. Normally, this should not have any effect on the application itself. However, it can interfere with some programs and cause them to behave erratically or crash.
For such, it would be recommended to shut down all processes that are not necessary, regardless if they hook into LoadRunner or not. Any programs that run as an icon in the system tray or on the taskbar are the first candidates for termination. Also, you can look through the list of processes in the Task Manager (right-click on the taskbar and select "Task Manager"). Some processes are system processes, which may not be able to be shut off, but any processes that can be shut down should be.

Disable anti-virus software

It is known that anti-virus software is intrusive when they are set to look for viruses. However, in searching for viruses, the software can interfere with a program’s proper execution. This could cause problems and sometimes crashes. This is why, for debugging purposes, we would recommend turning off the anti-virus software.
The icon for the anti-virus software resides in the system tray (where the clock is located). Normally, you should be able to right-click on the icon and select "disable." However, some setups do not allow a user to turn off the anti-virus software. It is recommended to speak to a system administrator to get the anti-virus program disabled for a short period for debugging the problem.

Reinstall

In case that all the above steps fail, the only recourse left would be to try to uninstall LoadRunner. It is possible that either a previous version of LoadRunner was on the machine before the current installation or that the installation did not go properly although the installation did not give any errors. It is recommended that a full uninstall be done in this case. The following steps are for a full uninstall:
1. Make sure that, all running LoadRunner processes (including the Controller, VuGen, Analysis and the Remote Command Launcher (for 6.x) or the LoadRunner Agent Process/Service (for 7.x) are closed.
2. Backup any existing scripts that may have been saved in the LoadRunner installation folder (The scripts are sometimes saved in a ‘scripts’ subdirectory under the LoadRunner installation folder.).
3. Run the uninstall program from the LoadRunner program group (or) use the Windows add/remove programs from the Control Panel. If any prompt is given about removing shared files, remove all the shared dlls that are reported as no longer being in use. In the very rare instance this causes a problem for some other application it may be necessary to re-install that other app. This is not generally a problem because every application should have registered which DLLs it needs to run.
4. Reboot the machine after the Uninstall wizard is complete. This will complete the basic uninstall procedure.
5. Delete all LoadRunner Folders. (Including the ones in the startup menu for Remote Command Launcher (LoadRunner 6.x) or Agent Process (LoadRunner 7.x)

7. Do a search for the following files and remove them from all locations — they will be replaced during the re-install.
a. wlrun.*
b. vugen.*

8. Bring up the registry editor: (Start à Run à regedit).

9. Delete the following keys:
a. Only for LoadRunner 6.x
HKEY_LOCAL_MACHINESOFTWAREBORLAND
b. If Load Runner is the only Mercury Interactive product on this machine, then delete
HKEY_LOCAL_MACHINESOFTWAREMercury Interactive.
HKEY_CURRENT_USERSOFTWAREMercury Interactive.
c. Else delete
HKEY_LOCAL_MACHINESOFTWAREMercury InteractiveLoadRunner.
HKEY_CURRENT_USERSOFTWAREMercury InteractiveLoadRunner.

10. Empty the Recycle-bin.
After you remove these items, you can re-install LoadRunner. Also, make sure that you do not have any anti-virus programs running while you are installing LoadRunner. That has been known to cause some problems with the installation of LoadRunner.
NOTE: Reinstallation should only be done for the following certain circumstances.
1. The crash only happens on a particular machine.
2. Some feature that was previously working is now crashing.
3. The above options were tried before hand.

Vugen Not Recording — Internet Explorer (iexplore.exe) “Hangs” when launched during recording

Vugen Not Recording — Internet Explorer (iexplore.exe) "Hangs" when launched during recording
When recording WEB (HTTP/HTML) script Vugen launches iexplore.exe but Internet Explorer window is not displayed.
This may occur due to COM object permissions.
Change the following Recording Options setting:
"Recording Options" -> General ->"Script": UN-CHECK "Track processes created as COM local servers"
Then record the WEB (HTTP/HTML) script.

Other solution are:
  • Check your loadrunner software is compatible with the current version of Internet Explorer.
  • Close all the browsers before you record any application.
  • Completely disable the DEP from windows.
  • Do you have all the administrative privileges if not atleast try to use “Run as Administrator” if you are using windows 7 or any new version.
  • Have you installed antivirus in your system. Some DLL files might be stopping the vugen to open the browser.If possible disable the antivirus completely for some time.
  •  Still not working, it’s time to repair loadrunner or uninstall loadrunner and install it again.
  • If it is still not working time to contact  HP Support.
  •  

The recorded application becomes unresponsive during the recording


This could be caused by VuGen’s recording mechanism not being able to connect to the application’s server. Network connection errors can be seen in the Recording Log:

[Net An. Warning (1068:197c)] Request Connection: Remote Server @ 123.123.123.123 - 5222 (Service=) Failed attempt #1. Unable to connect to remote server: rc = -1 , le = 10060) [Net An. Warning (1068:197c)] Request Connection: Remote Server @ 123.123.123.123 - 5222 (Service=) Failed attempt #2. Unable to connect to remote server: rc = -1 , le = 10060)




Note: the Recording log is in the ‘Output’ pane. Make sure ‘Recording’ is selected in the combo-box on the left:





In order to fix this problem, the Port mapping for the specific IP and port should be added to the Port Mapping dialog (under the Record > Recording Options… menu), and the entry should be unchecked. That will ensure that the above IP and port are not recorded – that application simply connects to them without any LoadRunner involvement. For the messages above the correct setting would be:





This workaround can be done in case the communication to 123.123.123.123:5222 is not important for the business process and can be omitted. If that’s not the case, the same entry should still be added, but left as checked. That will ensure correct traffic capture to this address.


No events are being recorded in Load runner scripting

Here are the most common reasons why no events are showing in the script:

The events counter keeps increasing, while the generated script is empty

This may be because VuGen’s recording mechanism fails to identify HTTP data. To fix it, ensure that your application indeed uses HTTP Web traffic. If the application uses SSL connections, make sure you choose the correct SSL version (SSL 2, SSL 3, TLS) through the Port Mapping dialog, available by clicking the ‘Options…’ button on the Record > Recording Options… dialog:



The Advanced Port Mapping Settings dialog opens when you click ‘Options…’:



The events counter shows less than five events, while the application keeps getting data from the server

In this case, VuGen’s recording mechanism fails to capture any network activity at all. Ensure that your application really does provide some network traffic, ie. it sends and receives data through the IP network. If an antivirus program is running, turn it off during recording. Check the recording log for any clues about the recording failure. Messages such as “connection failure” or “connection not trapped” can be a sign of the wrongly configured Port Mapping settings.

In addition, if you are recording on a Chrome or Firefox browser, make sure that all the instances of the browser are closed prior to the recording.


Specific events are not recorded in load runner scripting,why?

This is problem could be caused by the event being dropped as “uninteresting”. By default, VuGen’s Web (HTTP/HTML)protocol records client requests that return an HTTP response status of 2xx or 302, and discards all other requests. If a missing request returns a response that was discarded, such as 301, you can make a modification to the registry to instruct VuGen to generate a command for it:

Locate the following registry key:
[HKEY_CURRENT_USER\Software\Mercury Interactive\Networking\Multi Settings\QTWeb\Recording]
Add the following string value to it:
"GenerateApiFuncForCustomHttpStatus"="301"

     

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