Enabling the hidden debug options of the Java recorder

In the Recording Options -> Debug tab for a Java Vuser (Java, RMI and CORBA), the user can only view the "Stack trace" and "Stack trace limit" options, by default. There are other hidden options.

To Enable set the JavaLevel in the [DynaDlg] section of the vugen.ini file to 3

To view these extra Java debug options:

1. Open vugen.ini.

2. Go to the [DynaDlg] section.

3. Change the JavaLevel to 3.

If the [DynaDlg] section does not exist, add it to the end of the file.

[DynaDlg]

JavaLevel=3

Disable an IP for machine with multiple NIC when using IP spoofing

The user has a Load Generator that has two NIC cards, where one of them contributes to the network management interface and the other one goes to the Web server. With LoadRunner’s IP spoofing, both NIC spoofed multiple IPs.

When running the Vusers on the machine, all the IPs will be picked up. The Vusers using the IP of first NIC card will fail, as they cannot go to the Web server. How can the user have both the cards enabled, but disallow LoadRunner to see the IP from the first NIC card that has the management interface, if this card cannot be disabled from the machine?

Add logic using lr_get_vuser_ip() or manually assign the IP using web_socket_option()

Since it is not possible to make LoadRunner see some of the IPs and leave some from the routing table of the machine, you can:

1. Add some kind of logic into the script to obtain the IP address of the Vuser using the lr_get_vuser_ip() function and do a conditional check to kill the Vuser if the desired IP is not picked up.

2. Alternatively, use the web_socket_option() with the option "IP_ADDRESS_BY_INDEX " and use a random number generator with a seed for the index so the IPs would be picked up randomly within the desired range omitting the IP from the first NIC card.

Error: “Cannot retrieve license key” when accessing the license screen of the Admin site

When accessing the license screen on the performance Center Admin site and User Site, the following error occurs:

"Cannot retrieve license key"

1.) Register OrchidUtils.dll on all PC Servers .

Try to register OrchidUtils.dll within the <Performance Center Installation Directory>\bin directory.

This DLL is associated with the applying and retrieving the license from the Performance Center database.

2.) If this occurs on Performance Center 9.50 , then install SP1.

Manually register or unregister a DLL or OCX file

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>

Troubleshooting tips for a license error in Performance Center

Check the license

1. Make sure that the license is valid. To verify the license:

Log on to the admin site.

Go to System Configuration: License page.

2. Make sure that you do not exceed the limit for the Vuser/Machine/Concurrent Run limit. To verify:

Log on to the admin site.

Go to Miscellaneous: Privilege Manager -> Projects page.

3. Make sure that user is logged into all TestCenter servers (Web server, File Server, etc.).

4. Make sure that DCOM has not been turned off. To verify:

a) Go to Start -> Run.

b) Enter dcomcnfg.

c) Click <No> in the pop-up dialogs, if there are any.

d) In the "Distributed COM Configuration Properties" window, go to the "Default Properties" tab and verify the following:

1. "Enable Distributed COM on this computer" is selected.

2. "Default Authentication level" is set to "Connect."

3. "Default Impersonation Level" is set to "Identify."

5. On their utility server, try to register OrchidUtils.dll within the <Performance Center>\bin directory. This DLL is associated with the applying and retrieving the license from the Performance Center database.

6. If none of the above helps, try to reboot all of the server machines.

How to set up the environment for .NET Virtual Users development

LoadRunner .NET Virtual Users are developed through custom coding in .Net Visual Studio. Coding can be done in C#, C++, or Visual Basic. This document outlines the requirements for setting up the development environment with the LoadRunner product.

Install MS .NET Visual Studio, LoadRunner and the LoadRunner .NET IDE Add In component.

The .NET Virtual Users are developed using .NET Visual Studio from Microsoft. Installation of the following components is required to set up the environment for .NET Virtual User development.

1. .NET Visual Studio from Microsoft Visual Studio .NET 2003 (v 7.1), or Microsoft Visual Studio .NET 2005

2. LoadRunner with a .NET Virtual User license

3. LoadRunner Visual Studio 2003 or 2005 IDE Add-In available from the LoadRunner Installation DVD Additional Components section

After installing these components, .Net Visual Studio will support the .NET Virtual User type (C#, C++, and Visual Basic) projects. The .NET Virtual User should be developed using one of these projects. For example, to create VB Vuser:

1. Open .Net Studio.

2. Go to File -> New -> Project.

3. Select "Visual Basic Projects."

4. Select the "LoadRunner VB.NET Vuser."

5. Type in a name for the project and click <OK>.

6. In the project, you will see three functions: Initialize, Actions and Terminate. These functions are the same as vuser_init, Action1, and vuser_end in VuGen.

7. Add your codes into the sections as needed.

Error: “-27751: Step download timeout (120 seconds) has expired when downloading resource(s)…” even though timeout is set

The following error occurs even after setting receive and connect timeouts in the script using the web_set_timeout() function:

Error -27727: Step download timeout (120 seconds) has expired when downloading resource(s). Set the "Resource Page Timeout is a Warning"

This error indicates that the page download timeout limit has been exceeded. To specify a different limit value, do the following:

Go to Run-Time settings,

Go to Internet Protocol -> Preferences and select the "Options" button,

Change the "Step DownLoad Timeout (secs)" from the default value of 120 seconds to the desired value.

Note that in the Run-Time Setting dialog, the maximum limit for step download timeout is 32000 seconds. To specify an increased limit, use the web_set_timeout() function as follows:

web_set_timeout(STEP, "xx"); //for regular web Vuser

web.set_timeout(STEP, "xx"); //for regular Java / JavaScript Vuser

The Step Download Timeout encompasses all requests made from a single LoadRunner statement. For example, a step in the script may consist of a single request to the server, or may consist of 10 requests. For example an HTML mode web_url request to http://www.google.com would consist of an initial request to the Google server for the main HTML file. After parsing this HTML file, further additional resources will be downloaded (e.g. .gif files). In HTML mode, these resources are downloaded automatically as a part of the web_url for http://www.google.com. Thus, the Page Download Timeout will encompass all the requests, that is, the initial request and the requests arising from any related resources).