Micro Focus LoadRunner – Tips and Tricks

Table of Contents

5. LoadRunner – Tips and Tricks – Mar 2021

1. Compilation error when including in Vuser script a header or parameter file that resides on UNC path

What is the UNC path? 

UNC- Universal Naming Convention is the Unix group that created a standard for defining servers, printers, and other network tools. The name of the machine is followed by double slashes or backslashes in a UNC path. A single slash or backslash separates the path (disk and directories) within the device, as seen in the examples below. Drive letters (c:, d:, etc.) are not used in UNC names in the DOS/Windows example.

Sum Up: 

  1. When a vuser script refers to files stored on a UNC path, it generates a compilation error. 
  2. FOR EXAMPLE: a header (.h) or parameter (.dat) file. 
  3. In Vugen or on the controller as Localhost, the script works well. When run on a different host load generator, however, it fails.

Problem: CCI compilation error – In file included from c:\documents and settings\networkservice\Local Settings\Temp\brr_fse.978\global_dir\123456789\XYZZarch.c:3 Table ‘<UNC filepath> cannot be opened. Error code is ‘-2’

Cause: 

  1. When the Load Generator Agent is running as an operation, the problem arises (magentservice.exe ). 
  2. Services do not have access to UNC routes by default ( or remote disk drives).

The following  can be taken to resolve the issue: 

Option A: Use magentproc.exe to run the Load Generator Agent as a method. 

Option B: On the Load Generator unit, change the rights of service. 

  1. It is important to configure the Load Generator Agent with sufficient credentials to access the remote machine/location in the UNC path in order to run it as a service and allow it to access a UNC path. 

Taking the following steps: 

Firstly, Enable services to access network (UNC) paths.

  1. Regedit should be opened 
  2. Navigate to [HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa]
  3. Change the argument value for “disabledomaincreds” to 0. 
  4. To make the change successful, restart Windows. 
  5. Check to see if the load test is functioning correctly. If not, go to the second stage.

 (taken from http://www.winhelponline.com/articles/110/1/Stored-User-Names-and-Passwords-dialog-is-empty.html)

Secondly – 

  1. Configure this service’s user id to use the required id and password for accessing the UNC route.
  1. To associate a user name and password with a server and credentials, do the following: 
  • Go to Start->Run. 
  • Press ENTER after typing “rundll32.exe keymgr.dll, KRShowKeyMgr”

(Alternatively, Start->Settings->Control Panel->User Accounts:: Advanced tab:: Manage Passwords ).

  1. The “Stored User Names and Passwords” dialogue appears, allowing you to add any server and credentials combination. 
  • This process is carried out only for once, and the saved mapping will last through subsequent log-offs or restarts. 
  • It’s now possible to use the Explorer’s “Map Network Drive” feature on a regular basis to map every folder on the network servers as a local drive.

2. Vugen Script with custom header file in globals.h fails to execute in Performance Center, however, replays fine in VuGen

What is the VuGen script? 

The VUGen (Virtual User Generator) tool in LoadRunner is used to generate testing scripts that simulate real-user actions on your device. In VUGen, a virtual user (VUser) replaces a person, and the VUser’s behaviours are documented in a VUser script to simulate real-user behaviour for testing and monitoring. It is one of LoadRunner’s four main components. When you first start using HP LoadRunner for Performance Checking, this is the first part you’ll communicate with. 

The features of VUGen , that are quite important are- 

VUScripts: VuGen’s aim, as previously mentioned, is to build VUScripts that can be used to simulate a real-life virtual user.

Actions: An operation is a set of user transactions that are performed in the System Under Load to accomplish a specific mission. In other programming languages, an operation is equivalent to a function. 

There are three default functions in any Vuser script:

  1. Vuser init is a command that starts a user (used to login into the application) 
  2. Taking action (used to record the business process) 
  3. Vuser finish (used to log out of the application) 

VUGen not only records but also replays scripts (for a single VUser) to ensure that they are registered correctly. After you’ve double-checked that the script is right, you can use it in a LoadRunner scenario.

Sum Up: Handling scripts that use custom header files in globals.h on a PC

Problem: 

  1. Vugen scripts that have a custom header file in the global.h file (which is stored on a shared network drive), such as:

#include “lrun.h”

#include “web_api.h”

#include \files-libpccommon.h

  1. Replaying such a script in vugen works well, but when attempting to run it in Performance Center (PC), it fails with the following error messages: 
  2. The file could not be found due to an invalid path.

 Cause: The issue arises because the magnet is normally run as a service on the PC, and services by default are unable to see UNC paths or remote disk drives. You should not have this problem if you run the magnet as a process.

The following  can be taken to resolve the issue: 

Solution 1:

  1. One way to stop running magnet as a mechanism is to keep track of the remote machine’s username and password credentials by following the steps below: 
  2. This message discusses how to make accessing network services in the “MERCURYGLOBAL” (or any other) domain as easy as possible. You can create a mapping Server à Credentials To Use called “Stored User Names and Passwords,” which automates the logging in process. It literally takes the place of my “ReconnectOnStartup” program and hides the login process from you. 
  3. If you can’t change the mapping for “Stored User Names and Passwords,” do the following:
  • Open regedit
  • Navigate to  
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsa]
  • Change the “disabledomaincreds” argument value to 0.
  • Restart Windows for the changes to reflect.

(taken from http://www.winhelponline.com/articles/110/1/Stored-User-Names-and-Passwords-dialog-is-empty.html)

  1. You can also add entries to the mapping “Stored User Names and Passwords.” 
  2. Click on the Start, click Run, type rundll32.exe keymgr.dll, KRShowKeyMgr, and then press ENTER (Alternatively, StartàControl PanelàUser AccountsàAdvanced tabàManage Passwords).
  3. The dialog “Stored User Names and Passwords” appears, and you can pair any pair (server, credentials) you want. 
  4. This process is carried out only once, and the saved mapping will last through subsequent log-offs or restarts. 
  5. You can now use the Explorer’s “Map Network Drive” feature on a regular basis to map any folder on the network servers as a local drive.
  6. This also may possibly resolve the problem of installing the new Norton Security Guard that is not working well with the HP Credentials Manager.

Solution 2:

  1. To run magentservice.exe on LoadGenerators, use IUSR METRO or a domain account with complete permissions over the network drive. 
  2. To switch from the default SYSTEM account: 
  3. Locate magentservice.exe in Control panel-> Administrative tools->Services, double-click it, and in the “log on” tab, give the account full permissions.

3. Error when embedding HTTP headers inside a SOAP header

What is meant by a SOAP Header? 

While some WSDL files require a SOAP header to be transferred with each order, the SOAP header is an optional part of the SOAP envelope. A SOAP header is associated with a SOAP request or response message and contains application-specific context information (for example, security or encryption information).

Sum Up: When trying to add an HTTP header to a SOAP header within a web service call(), but the following error pops up. 

Problem: Error: InvokeMethod failure: Unable to cast object of type ‘System.Xml.XmlText’ to type ‘System.Xml.XmlElement’..

Cause: 

  1. It is not recommended to include HTTP headers in a SOAP header. 
  2. The problematic code tends to be as follows:
 web_service_call( "StepName=GetMyView",
         "SOAPMethod=MyMethod|BindingLink|GetMyView",
         "SOAPHeader=<SoapHeader>"
          web_add_header( "<Content-Type", "text/xml; charset="utf-8">);
          web_add_header("SoapAction","MyServices.Services.SomeLink.GetMyView");
          web_add_header("EndPointAddress","https://someserver.nowhere.net/SomeLink/FinalLink.svc/wsHttp");
             web_add_header("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727");
         </SoapHeader>",
     ...
     ... code omitted for clarity
     ...
  BEGIN_ARGUMENTS,
     ...
     ... code omitted for clarity
     ...
  END_ARGUMENTS,
  BEGIN_RESULT,
  END_RESULT,
  LAST);

The following  can be taken to resolve the issue: 

Remove the web_add_header() code from the SOAP header in the web_service_calI(), moving them to just prior to the web_service_call():
web_add_header("Content-Type","text/xml; charset="utf-8");
web_add_header("SoapAction","MyServices.Services.SomeLink.GetMyView");
web_add_header("EndPointAddress","https://someserver.nowhere.net/SomeLink/FinalLink.svc/wsHttp");
web_add_header("User-Agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NETCLR 1.1.4322; .NET CLR 2.0.50727");
web_service_call(); // after removing HTTP headers from SOAP header.

4. Jenkins Jobs failing with Failed executing operation ‘Analyzing’

What is Jenkins Job?

Jenkins Freestyle Projects are build jobs, scripts, or pipelines that include steps and post-build activities that can be repeated. It’s a better work or task that can be extended to various operations. You can easily configure, trigger and provide Jenkins project-based protection.

Sum Up: 

With Jenkins jobs, you might be getting the following mistake. The test might go smoothly and compiles the data, but it fails to evaluate them.

Problem: 

ERRORS:

  • Operation execution failed. The internal mistake in ‘Analyzing’: ‘Error in start data processor execution.’ 
  • A critical mistake in the interpretation of the data. ‘ExecuteRequest’ is the reason. (403) Forbidden was the response from the remote server. 

Note: We were able to manually analyze the findings on one of the hosts using AnalysisUI.

The following  can be taken to resolve the issue: RESOLUTION: LRE 2020 SP3 HF4 “HOTFIX 4”

5. TruClient Firefox scalability issues using Microsoft Terminal Services

Sum Up: 

  1. Microsoft Terminal Services is unable to operate a greater number of Vusers. 
  2. When using Microsoft Terminal Services to run a larger number of TruClient Firefox Vusers, the Vusers get trapped in the Init state.

The following  can be taken to resolve the issue: 

  1. The dll launcher.dll and the executable TSLauncher.exe also have an issue. 
  2. The additional parameter written in the RDP file was not passed to the launcher by the controller. 
  3. As a result, the RDP session’s magentproc.exe was not loaded. 
  4. TSLauncher.exe has been patched and will now successfully load magentproc.exe and change the RDP file as required.

Please find below the to follow for your version.

  1. Loadrunner 12.00, LoadRunner 12.01, Performance Center 12.00, and Performance Center 12.01 users can follow these instructions:
  • Backup the files launcher.dll and TSLauncher.exe on the Load Generator machines (located by default in “C:\Program Files (x86)\HP\Load Generator\bin”, “C:\Program Files (x86)\HP\Performance Center Host\bin\”),
  • Copy to all of the remote LGs and PC hosts the provided launcher.dll and TSLauncher.exe (rename TSLauncher.exe.120x.hotfix to TSLauncher.exe),
  • Backup the files launcher.dll and TSLauncher.exe on the Controller machines (located by default in “C:\Program Files (x86)\HP\LoadRunner\bin\”, “C:\Program Files (x86)\HP\Performance Center Host\bin\”),
  • Copy to all of the controllers the provided launcher.dll,
  • Configure TSLauncher.exe and magentproc.exe as an allowed remote application on the LGs and PC hosts (Please refer to: http://technet.microsoft.com/en-us/library/cc753610.aspx).
  • Perform a test via the controller or Performance Center
  1. Instructions for Loadrunner 12.02 and Performance Center 12.20:
  • Backup the files TSLauncher.exe on the Load Generator machines (located by default in “C:\Program Files (x86)\HP\Load Generator\bin”, “C:\Program Files (x86)\HP\Performance Center Host\bin\”),
  • Copy to all of the remote LGs and PC hosts the provided TSLauncher.exe (rename TSLauncher.exe.120x.hotfix to TSLauncher.exe),
  • Configure TSLauncher.exe and magentproc.exe as an allowed remote application on the LGs and PC hosts (Please refer to: http://technet.microsoft.com/en-us/library/cc753610.aspx).
  • Perform a test via the controller or Performance Center
  1. Hotfix files:
  • launcher.dll for Loadrunner 12.00 and Performance Center 12.00,
  • launcher.dll for Loadrunner 12.01 and Performance Center 12.01,
  • TSLauncher.exe for all Loadrunner 12.02 and Performance Center 12.20 versions.

6. Jenkins – Performance Center/LoadRunner Integration

Sum Up: 

  1. Details and details about the Jenkins software’s integration with Performance Center and LoadRunner. 
  2. Using the Jenkins – HP Application Automation Tools Plugin, Jenkins, as an open-source and integration platform, helps you to run HP tests. 
  3. This plug-in activates the various ALM platform test sets, such as Unified Functional Testing, QuickTest Professional, or Service Test, LoadRunner scenarios, and Performance Center. 
  4. It’s important to remember that Performance Center and LoadRunner are two separate items, and only the versions mentioned below are supported.
  5. This plugin lets you run an HP test as a build stage and see the results in Jenkin’s UI, just like JUnit. 
  6. This plugin currently supports the following features:

 * HP Unified Functional Testing 11.5x and 12.0x (QuickTest Professional and Service Test 11.50 capabilities)

 * The HP Quality Center 10.00, with the QuickTest Professional Add-in for triggering test sets

 * The HP ALM Lab Management 11.50, 11.52, and 12.xx

 * The HP Service Test 11.20 and 11.50

 * The HP Application Lifecycle Management 11.00, 11.52, and 12.xx

 * The HP Performance Center 12.xx

 * HP QuickTest Professional 11.00

 * HP LoadRunner 11.52 and 12.0x

  1. Use the Quality Center Plugin if you’re using Quality Center 10.00 or earlier and QuickTest Professional 9.x or 10.x. 

7. OpenSSL 1.0.1j upgrade for LoadRunner and Performance Center

Sum Up: 

  1. Upgrade to OpenSSL 1.0.1j for LoadRunner/Performance Center versions 11.0x and 12.0x. 
  2. This hotfix includes the OpenSSL version 1.0.1j libraries and addresses the most recent security vulnerabilities in OpenSSL. 
  3. The hotfix is compatible with the following versions of LoadRunner and Performance Center: 11.04, 12.00, and 12.01. 

Note: Since this update was already included in LoadRunner 11.52 patch 4 and LoadRunner 12.02, this hotfix is no longer necessary. 

  1. There is a security warning available athttps://www.openssl.org/news/secadv_20141015.txt

The following  can be taken to resolve the issue: 

Upgrade instructions:

  1. Backup all ssleay*.dll and libeay*.dll files in the <Installation Dir>\al_agent folders and <Installation Dir>\bin, <Installation Dir>\launch_service.
  2. You will realize that the <Installation Dir> varies for the different components from which it can be concluded that the default path for full LoadRunner is “C:\Program Files (x86)\HP\LoadRunner\”  and for Load Generator standalone installations it is “C:\Program Files (x86)\HP\Load Generator\” and for Performance Center Host it is “C:\Program Files (x86)\HP\Performance Center Host\”).
  3. Extract the patched dlls from the corresponding archives below:
  • LoadRunner/Performance Center Host 11.04 – Download
  • LoadRunner/Performance Center Host 12.00 – Download
  • LoadRunner/Performance Center Host 12.01 – Download

8. Error “No such interface supported” is received on perfmon

Problem: When using a non-administrator account to connect to a monitor, it fails, and when using perform, it returns the error “No such interface enabled.”

Cause: A lack of permissions is the source of the mistake.

The following  can be taken to resolve the issue: 

  1. To reset permissions with secedit, type the following command at the command prompt:
secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose
  1. Remote access to Perfmon counters is now possible. 
  2. Check out this for more information.

9. HTTP 500 and a SOAP Fault during replay of a Web Service script

Sum Up: 

When a Web Service receives an unknown account number, it returns an HTTP 500 error and a SOAP Fault, causing the Vugen Web Service script replay to fail. This Knowledge Brief explains how to modify the Vugen script to manage HTTP 500 and SOAP Faults.

Problem: 

  1. When using a Vugen 9.5 script generated with a WSDL import to evaluate a well-known Web Service, the error returned can not be handled by Vugen if the data listed is invalid. 
  2. The Vugen Web Service script replays without error when the right data is supplied to the Web Service. 
  3. In certain test cases, however, the Web Server returns an HTTP 500 with a SOAP Fault, such as when a call to the service is made with an invalid account number. 
  4. The Vugen replay will fail as a result, with the following messages appearing in the Vugen Replay log:
<snip>
Action.c(6): HTTP/1.0 500 Internal Server Error
Action.c(6): X-Backside-Transport: FAIL FAIL
Action.c(6): Server: Apache-Coyote/1.1
Action.c(6): SoapAction: "http://xxx.yyy.com/xxxx/yyyyy/Recognition-v1/wsdl/Recognition"
Action.c(6):    
Action.c(6): Content-Type: text/xml
Action.c(6): Date: Mon, 30 Nov 2009 07:19:48 GMT
Action.c(6): X-Client-IP: xx.xx.xx.xx
Action.c(6): Connection: Keep-Alive
Action.c(6): Content-Length: 1454
Action.c(6):    
<snip>
Action.c(6): Error Exceptions:
Action.c(6): System.Exception: Soap error:
Message:bad cin value : contract not found
Mercury.LR.LrWsNetClient.ProxyCreator.InvokeMethod(String sMethod, IWSMethodParameters mParams, String sAsyncEvent)
Mercury.LR.LrWsNetClient.NetReplay.InvokeMethod(String sMethod, IWSMethodParameters mParams, String sAsyncEvent)
Action.c(6): Error: <CENTER><STRONG><FONT COLOR=#FF0031>Expected SOAP result, received SOAP fault</FONT></STRONG></CENTER>
Action.c(6): Error: <CENTER><STRONG><FONT COLOR=#FF0031>Failed to retrieve output arguments/checkpoints - SOAP fault occurred</FONT></STRONG></CENTER>
<snip>
  1. How can Vugen handle the SOAP Fault and the HTTP 500 so that the Web Service script can be used to test the service response to invalid data? 

Cause: 

  1. If there is an irrecoverable error, the Web Server generates an HTTP 500 error, but it can also be caused when there is a SOAP Fault, or when a problem is found at the application level. 
  2. This behavior is documented in
  3. http://www.w3.org/TR/2000/NOTE-SOAP-20000508/# Toc478383529 this conduct. 
  4. In this case, a non-existent account number is transferred to the application through the Web Service, resulting in the server returning both an HTTP 500 and a SOAP Fault response.

The following  can be taken to resolve the issue: 

  1. Negative testing is when you test a Web Service with data that is knowingly incomplete or wrong. 
  2. The web service call in a Vugen Web Services script uses optimistic checking by default, which means the script will fail if the server returns a SOAP Error. 
  3. Adjust the default behavior of the web service call to accept ANY response from the server by adding the argument “ExpectedResponse=AnySoap” to allow the script to handle the SOAP Fault. 
  4. For more details, see Volume II – Protocols -> Web Services – Negative Testing in the Vugen 9.50 User Guide. 
  5. The application’s actual error code or message (e.g., “Invalid Account Number”) can then be recovered from the SOAP response by calls to lr_xml_find and lr_xml_get_values within the script. 
  6. The Vugen online support and the Vugen 9.50 User Guide Volume 1 -> Chapter 26 – Programming with the XML API -> Using XML Functions document how to use these functions.

10. Issues under high load for Citrix tests when using HP Citrix Agent


Sum Up: After a large number of Citrix Vusers are running, link or other similar issues can occur during Citrix tests. When Citrix Agent is used for Text Synchronization or other purposes, this occurs.

Problem: Citrix tests have link problems when there is a lot of traffic.

Cause: 

  1. Citrix Virtual Channels are used by the Citrix Agent (which is mounted on the Citrix Server) to communicate with the Citrix Client (on the client machine). 
  2. On the Citrix Server side, and HP Citrix Agent instance is launched for each Citrix Vuser operating on the LoadGenerator machines. As a result, they each create a Citrix Virtual Channel. These channels can experience problems in a large number of situations, resulting in unexpected communication issues. 
  3. To learn more about Citrix Virtual Channels, click here: http://support.citrix.com/article/CTX116890

The following  can be taken to resolve the issue: 

  1. Instead of Citrix Virtual Channels, use TCP Channels. 
  2. After the client and server have built a connection, the Citrix Virtual Channel is used to create a handshake between the Citrix Client and the HP Citrix Agent. TCP networks, on the other hand, are used for forwarding communication. 
  • Open default.cfg in the script folder. 
  • Set TCPChannel=1 in the [Citrix] segment. 
  • To install Citrix Agent on a Citrix Server, go to Citrix Agent Installation. 
  • Open the CtrxAgent.ini file. 
  • Under [ChannelConfig], set TCPChannelEnabled=1. 
  1. CtrxAgent has two additional critical parameters that should be considered. 
  2. NumPorts and MinPortValue Agent will look for a free port starting at MinPortValue and continuing until MinPortValue + NumPorts in order to assign TCP ports.
  3. If you find a Firewall in between, it should be configured to allow communication on those ports.