Tag Archives: HP LoadRunner 11

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

Configure a proxy server for connecting VuGen to a remote Git server

VuGen 12.53 supports integration with Git, enabling you to store scripts in a local or a remote Git repository. If a proxy server is needed to access the remote repository, the proxy configuration needs to be set up manually outside of VuGen using a Git command line client.

VuGen does not include a Git command line client, so it must be installed manually.

Follow the instructions below to set up a proxy server for Git:

  1. Install any Git command line client i.e. Git-SMC (the portable version will also work)
  2. Open the Git client (If you installed the Git-SMC run the git-cmd.exe)
  3. Execute the following command (replace the <proxy_server> and <port_number> with the correct values, note the two consecutive hyphens prepending the global option)
    git config –global http.proxy <proxy_server>:<port_number>
  4. To reset the proxy settings execute the following command (note the two consecutive hyphens prepending the global and unset options):
    git config –global –unset http.proxy

VuGen is unable to save imported Libraries in TruClient

When importing a Library from Develop Script -> Function Libraries and saving it, everything is fine. But when closing the Develop Script mode and opening it again, the library is not shown.
The script is not able to parse the XML files correctly. It could be due to crash of VuGen before the script became corrupted or if the script replay is interrupted unexpectedly. If something unexpected happened, VuGen can get corrupted and the reading process may be incorrect.
The following can help to fix the issue:
1. Take the .xml files from the “libraries” folder (within the script folder) and put them out of the script folder.

2. Delete the original files from the “libraries” folder.

3. Open the script with VuGen.

4. Go to Function Libraries.

5. Select the button “Import Library”.

6. Navigate and select the .xml files saved out of the script folder.

After doing this, the script will read/parse the XML files again and this time, it will be done correctly.

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.

When should LSHOST and LSFORCEHOST be defined

Defining the LSHOST and LSFORCEHOST variables
Note:
These variables only need to be defined if WinRunner has trouble locating your License manager server or if you want the specified effect. Define LSHOST:
1. When the client and server are in different domains.
2. If you want the client to use more than one available server, in a specific order.
Define LSHOST to be the server names in the order you would like to search them. Separate the server names with a semicolon (“;”). Note:
When LSHOST is used, WinRunner will first look for a license on the specified servers, in the specified order. If a license is not found there, WinRunner will search your network for one.
Define LSFORCEHOST when you want the client to search the license on only ONE specific server. Define LSFORCEHOST to be the name of that server.