Tag Archives: LoadRunner Error Message

Enable Unified Functional Testing (UFT) logs

Previously, QuickTest Professional used the tool \bin\ClientLogs.exe utility, setting up its section called “QTP”, however for UFT, this option does not capture any logs.

Instructions to collect desired logs:

1. Close UFT.exe, AQTRmtAgent.exe and QTAutomationAgent.exe

2. Locate tool’s “Logs” directory/folder (see A section below)

3. Configure config.xml files (see B section below)

4. Clear “Logs” directory/folder.

5. Reproduce situation. If reproduction requires multiple repetitions/iterations, repeat steps 4 – 5.

Note: Enabling logs as suggested may generate larger logs files, so minimizing the tasks done on UFT to reproduce, and clearing the logs before each attempt of reproduction, may help collecting more accurate information from such logs.

6. (If possible) Collect date and time when issue. Note: this helps narrowing down search within logs.

7. Compress logs

A. Logs location/path/directory

The UFT log files generated from below steps should get created by default under the following path:

%APPDATA%\Hewlett-Packard\UFT\Logs

To navigate to above, go to “Start” > “Run” and type above path. Note: if above path is not found, then:

Review which path is setup for logs, on the configuration file of respective feature. For example for general UFT, under log.config.xml, path is configured to default with below entry:

Ensure UFT and machine is using correct files.

B. Configure config.xml files

1. Create backup of \bin\log.config.xml. Note: this is to “disable” expanded logs by replacing modified files with backup

2. Open on a text editor \bin\log.config.xml

3. If the test execution is longer than 30 min, increase the value of maximumFileSize to 50MB:

4. Change the “level value” under “root” tag to DEBUG (instead of ERROR):

5. Make sure all appender-ref element values are set to “RollingFileAppender”:

6. If involving API scripts, add logger/tag named “HP.ST” as below:

set “level value” to DEBUG, under “LogCatRmtAgent” logger:

7. Save changes on log.config.xml

8. Repeat steps 1 to 5 for below files \bin\log.config.AutomationAgent.xml, THEN save changes.

9. For \bin\log.config.RemoteAgent.xml, repeat steps 1 to 5, THEN

10. For \bin\qeee.log.config.xml, repeat steps 1 to 4, THEN:

1. Make sure all appender-ref element values are set to “QEEE_RollingFileAppender”:

2. Set “level value” to DEBUG, under “HP.QTP.QEEE” logger:

Advertisements

Use rdp_sync_on_window for a partially changing window title

To use rdp_sync_on_window for a partially changing window title for the following scenario

rdp_sync_on_window(“StepDescription=Window Synchronization 1”,

“Snapshot=snapshot_12.inf”,

“WindowTitle=I am static XXXX YYYYY ZZZZ”,

“WindowState=ACTIVE”,

RDP_LAST);

Need to use sync on the portion of the window name that doesn’t change where XXXX YYYYY ZZZZ change, but the first part (I am static) stays the same.

To achieve this the windowTitle argument comes with regular expression

WindowTitle/RE=

In the above example, we can keep the first part static(I am static) and exclude the 2nd part (XXXX YYYYY ZZZZ)using Regular expression.

LR Controller throws Microsoft Visual C++ Runtime Library Runtime Error

Using LoadRunner (LR) 11.00 Patch 4 on a machine that was previously running LR 11.50. When trying to open a scenario the wlrun process crashes and the following message is displayed:

Unsupported operation was attempted

Microsoft Visual C++ Runtime Library

Runtime Error!

Program: C:\\Software\\HP\\LoadRunner\\bin\\wlrun.exe

abnormal program termination

This happens on every attempt to open an LR scenario. Uninstalling and re-installing LoadRunner 11.00 or and 11.04 patches does not resolve the problem. Upgrading LoadRunner to version 11.50 is not possible on this machine as it currently has to run with an LR 11.00 license key.

In certain cases uninstalling of LR 11.50 may leave registry keys enabled for the LR 11.50 version that are incompatible with LR 11.00 and therefore cause the 11.00 wlrun process to crash. To resolve the problem try the following steps on a Windows 7 64 bit machine:

Back up the registry.

Run Regit and go to HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{6B2455C3-CAF8-4578-BBA4-B7566F89EBAA}\InprocServer32

Delete any 11.5x subfolders.

On a Windows XP 32 bit machine the invalid 11.5x entry will be found in

HKEY_CLASSES_ROOT\CLSID\{6B2455C3-CAF8-4578-BBA4-B7566F89EBAA}\InprocServer32\11.5x.0.0

Error: “Object doesn’t support property or method ‘indexOf'” when saving the “Speed simulation” run-time settings of a TruClient script

An error is received when trying to save the “Speed simulation” Run-time settings of a TruClient script:

“Script Error: An error has occurred in the script on this page.

Error: Object doesn’t support property or method ‘indexOf'”

As a result the settings are not saved and the “Save” button becomes disabled.

The issues is caused by missing default values for the speed simulation settings.

To fix the issue for the current script:

1.Open the default.cfg file in the script folder.

2. Go to the [ModemSpeed] section

3. Add values for the ModemSpeedUpload, ModemSpeedDownload and ModemSpeedDownloadAndUpload settings.

For instance:

[ModemSpeed]

ModemSpeedMode=1

ModemSpeedUpload=0

ModemSpeedDownload=0

ModemSpeedDownloadAndUpload=0

4. Save the file and reopen the script in TruClient

5. Go to the Run-time settings > Network > Speed simulation. Changing and saving the values should work now.

To fix the issue for any new scripts, modify the run-time settings templates for TruClient IE and Firefox:

Apply the above changes to the following default.cfg file:

<LoadRunner installation>\template\WebIE\default.cfg

<LoadRunner installation>\template\Web2UI\default.cfg

After saving the changes, any new TruClient script will have the default runtime settings for “Speed simulation”

License features used by the HP (Former Mercury) Functional Testing Concurrent License Server when working with QuickTest Professional (QTP) or Service Test (ST)

List of license features
The features below are used by the Concurrent License Server and are displayed in the tools that are shipped with it, such as WlmAdmin, Wcommute, or LSdecode: Common/Latest/Most-used features:

* UnifiedFunctionalTesting – Unified Functional Testing (UFT)
Usage: Unified Functional Testing (version 11.5 and above), QuickTest Professional (version 11.00 and above) and Service Test (version 11.00 and above) core products and QuickTest Professional add-ins. * HpFunctionalTesting – HP Functional Testing
Usage: Only for QuickTest Professional (version 9.5 and above) and WinRunner (only 9.2) core products and their add-ins, not working for UFT 11.50 and above!!! * FT-unified – Functional Testing core
Usage: QuickTest Professional (version 6.5 and above) and WinRunner (version 7.6 and above) core products and the core add-ins (Visual Basic, Active X and Web). * FTAddins – Functional Testing add-ins
Usage: WinRunner (version 7.6 and above) and QuickTest Professional (version 6.5 and above) external add-ins that are not shipped with the core product. * QuickTestPro – QuickTest Professional core
Usage: QuickTest Professional (version 6.5 and above) core program and the core add-ins (Visual Basic, Active X and Web). * QTAddins – QuickTest Professional add-in
Usage: QuickTest Professional (version 6.5 and above) external add-ins that are not shipped with the core product. * QTPEssentials – QuickTest Professional Essentials
Usage: Enables only QTP 11 basic features (version 11.00 and above), meaning ActiveX, Visual Basic, Web, Java and .NET add-ins. All other installed add-ins will be disabled as well as UFT check-box. * ServiceTest – Service Test
Usage: Service Test VuGen (10.x and older) and Service Test Visual Test Designer (11.x and newer). Other/Older features:

* WR-core – WinRunner core
Usage: WinRunner (version 7.6 and above) core program and the four add-ins that are shipped with it. * WRAddins – WinRunner add-ins
Usage: WinRunner (version 7.6 and above) external add-ins that are not shipped with the core product. * Java – QuickTest Professional Java add-in
Usage: QuickTest Professional Java add-in version 8.2 and above. * WinForms – QuickTest Professional .Net add-in
Usage: QuickTest Professional .Net add-in version 8.2 and above. * SapGui – QuickTest Professional mySAP.com add-in
Usage: QuickTest Professional mySAP.com add-in version 8.2 and above. * Siebel – QuickTest Professional Siebel add-in
Usage: QuickTest Professional Siebel add-in version 8.01 and above. * TerminalEmulators – QuickTest Professional Terminal Emulator add-in Usage: QuickTest Professional Terminal Emulator add-in version 8.0 and above. * Oracle – QuickTest Professional Oracle add-in
Usage: QuickTest Professional Oracle add-in version 8.2 and above. * PeopleSoft – QuickTest Professional PeopleSoft add-in
Usage: QuickTest Professional PeopleSoft add-in version 8.2 and above. * Stingray – QuickTest Professional Stingray add-in
Usage: QuickTest Professional Stingray add-in version 8.2 and above. * VisualAge – QuickTest Professional VisualAge SmallTalk add-in Usage: QuickTest Professional VisualAge SmallTalk add-in version 8.2 and above.

Install/set up a redundant license server pool

These are the required steps to install redundant licenses:
1. Make sure there is no concurrent license already installed on the license servers (look for the LSERVRC environment variable or for “lservrc” on Windows search, if the file exists, remove any concurrent license keys contained on it or remove the file).
2. Stop the Sentinel RMS service for all the license server machines that will be on the redundant license pool (go to Start > Control Panel > Administrative tools > Services).
3. Use the WRlfTool utility to add the servers (name and IP address) and the redundant license key to the “lservrlf” file (redundant license file). The WRlfTool is located under the “utils” folder on the License Server installation files.
4. Save the lservrlf file under the License Server’s installation path (i.e. C:\Program Files\Common Files\SafeNet Sentinel\Sentinel RMS License Manager Server\WinNT)
5. Copy and paste the lservrlf file into the other license servers on the pool in the same path as saved on the Leader license server (i.e. C:\Program Files\Common Files\SafeNet Sentinel\Sentinel RMS License Manager Server\WinNT).
6. Start the Sentinel RMS service for all the license server machines that will be on the redundant license pool.
7. On the UFT/QTP client machine, create the LSHOST environment variable under the user variables (go to Start > Control Panel > System > Advanced > Environment variables). The value should be the name or IP address of all the license servers on the pool, separated by colon (i.e. lserver01:lserver02:lserver03 ) or semi-colon (i.e. lserver01;lserver02;lserver03 ) depending on the environment.
8. The Redundant License pool should be set now. Launch UFT/QTP to verify it is working fine.
Note: The redundant license servers use the majority rule. This means that a majority (over half) of the redundant license servers must be up and running in order to get a license for UFT/QTP. For example, if there are 3 redundant license servers, at least 2 of them must be up and running. If there are 5 redundant license servers, 3 of them must be up and running to get a license.
For more information about setting up a redundant license server pool, refer to “Setting up the Redundant License Servers” on the license server installation files at\LicenseServer\server\SysAdminHelp\Default.htm

How to set the LSHOST or LSFORCEHOST system variable

Determine which variable to use then set the system variable

On Windows NT
1. Bring up the System Properties dialog:
a. Right-click on “My Computer.”
b. Choose Properties.

OR

a. Go to Start -> Settings -> Control Panel.
b. Double-click on System.

2. Select the Environment tab.
3. Select a variable in the System Variables group.
4. Replace the Variable name with “LSHOST” or “LSFORCEHOST.” 5. Replace the Value with the License Server name or names.

Note:
You can use the name or IP address of the server machine.

6. Click .
7. Click .

On Windows 2000, XP and Vista
1. Bring up the System Properties dialog:
a. Right-click on “My Computer.”
b. Choose Properties.

OR

a. Go to Start -> Settings -> Control Panel.
b. Double-click on System. (i.e. System can be found in the “Classic View” of both Windows XP and Vista). For Windows XP, if you have a list of categories, you can find System in the “Performance and Maintenance” category. For Windows Vista, you can find System in the “System and Maintenance” category and click on the “Advanced system settings” in the left panel.

2. Select the Advanced tab.
3. Click .
4. Click for System Variables.
5. Enter “LSHOST” or “LSFORCEHOST” for the Variable name.
6. Enter the License Server name or names for the Value.

Note:
You can use the name or IP address of the server machine.

7. Click
8. Click

On Windows 95/98/Me
1. Go to Start -> Run.
2. In the Open edit field, type sysedit.
3. Click .
4. Set the LSHOST or LSFORCEHOST variable.

Example:
Set LSHOST=

OR

Set LSFORCEHOST=.

Note:
You can use the name or IP address of the server machine.

5. Save and close the autoexec.bat file.
6. Reboot the machine. This will force the information added to the autoexec.bat file to be entered into the system environment.