Micro Focus LoadRunner – Tips and Tricks

Table of Contents

3. LoadRunner – Tips and Tricks – Jan 2021

1. The basic recommended permissions required for LRE DB Administrator

The basic recommended permission is needed for connecting the latest LRE 20202 and further to an Oracle database server. It is specifically based on the installing database user, as they need to obtain permissions to run specific administrative tasks on the Oracle. Tasks could be anything like making the LRE project user schema, copying data between projects and data manipulation of sorts.

Sometimes it happens that the user is unable to utilise the Oracle system due to some security issues. It is widely advised that the user’s database administrator should create an LRE database administrative user properly.

For example:

Ire_admin that has some kind of speciality and certain rules, that need LRE to be installed. The database administrator is very important because, through that, we are able to create and edit an LRE database administrative user. You can use the example script given below for editing:

LRE_ADMIN_DB__ORACLE.sql, 

The script mentioned above attached is the one that can be used for addition too. This script is responsible for making the LRE database administrative user along with the recommended grants that are necessary for the database. The database administrator needs to initiate the script and create the user on the database server in a precise manner.

You just need to follow the steps mentioned below:

/* *************************************************************************************************************** */
/*                                                                         */
/* LRE_ADMIN_DB__ORACLE.sql                                                */
/* ========================                                                */
/* Minimum recommended permissions required for LRE DB administrator.      */
/*                                                       		   */
/* ===========================================================================================*/
/* !!!! This script should be executed with a user that has the SYSDBA System Privileges !!!! */
/* ===========================================================================================*/
/*                                                         */
/* Oracle version. (NON CDB)                               */
/*                                                         */
/* Created by: Aharon S. (1-Dec-2019).                        */
/*                                                         */
/* Parameters:                                                */
/* 1) &p1_admin_user_schema -  admin schema name.             */
/* 2) &p2_admin_user_password -  admin schema password.       */
/* 3) &p3_default_tablespace - default tablespace name.       */
/*                                                            */
/* Usage:                                                     */
/* c:\temp\> sqlplus <dba uid>/<dba password>@<tns alias> @LRE_ADMIN_DB__ORACLE.sql lre_admin lre_admin lre_tablespace   */
/*                                                         */
/*                                                         */
/* Change log:                                             */
/* 01-Dec-2019 by Aharon S.		Initial creation           */
/* 13-Sep-2020 by Aliza S.		Removed the "with admin option" from the "grant create user" statement(s)         */
/*                                                         */
/* ***************************************************************************************************************** */

define p1_admin_user_schema = &1
define p2_admin_user_password = &2
define p3_default_tablespace = &3


create user &p1_admin_user_schema identified by &p2_admin_user_password
default tablespace &p3_default_tablespace temporary tablespace temp
/

grant create session to &p1_admin_user_schema with admin option
/

DECLARE 
v_cdb varchar2(3);
v_sql1 varchar2(255);
v_sql2 varchar2(255);

begin

v_sql1 := 'grant create user to  &p1_admin_user_schema  container=current' ;
v_sql2 := 'grant create user to  &p1_admin_user_schema' ;

select CDB 
into v_cdb
from V$DATABASE;

    if v_cdb = 'YES' THEN
        dbms_output.put_line(v_sql1);
        execute immediate v_sql1  ;
    else
        dbms_output.put_line(v_sql2);
        execute immediate v_sql2  ;
    end if;
end;
/


/* ***********************************************************************
*********************************************************************** */

grant create table to &p1_admin_user_schema with admin option
/

grant create view to &p1_admin_user_schema with admin option
/

grant create trigger to &p1_admin_user_schema with admin option
/

grant create sequence to &p1_admin_user_schema with admin option
/

grant create procedure to &p1_admin_user_schema with admin option
/

/* only if text search is enabled */
grant ctxapp to &p1_admin_user_schema with admin option
/

/* ***********************************************************************
*********************************************************************** */

grant select on dba_free_space to &p1_admin_user_schema
/

grant select on sys.dba_tablespaces to &p1_admin_user_schema
/

grant select on sys.dba_users to &p1_admin_user_schema
/

grant select on sys.dba_registry to &p1_admin_user_schema
/

grant select on sys.dba_roles to &p1_admin_user_schema
/

/* ***********************************************************************
*********************************************************************** */

grant select any table to &p1_admin_user_schema with admin option
/

grant insert any table to &p1_admin_user_schema
/

grant create type to &p1_admin_user_schema with admin option
/

2. Instructions to handle the crisis, when the LRE connection fails every time being connected by utilising the VuGen’s LRE Integration

It often happens that LoadRunner Enterprise connection using VuGen Integration miserably fails at the very beginning, i.e., at the login step itself. This failure is usually caused when fetching all of the test folders from the LoadRunner Enterprise Server fails. Hence, it results in all the operations in the VuGen to fail.

This failure can be fixed, as well. You just need to follow the rules given below:

  1. You need to download the hotfix and then extract all of the contents.
  2. Then you need to end/stop the LoadRunner Backend Service.
  3. After that, you need to create a backup of the authentic and original files:

LRE.Core.Api.dll and LRE.Core.Api.exe files from <LoadRunner Enterprise server installation directory >\LRE_BACKEND\bin.

  1. Then you need to copy all the files from Step 1 and replace them under the folder given above.
  2. Now you need to Restart the LoadRunner Backend Service. 

3. Instructions on changing the log location in Octane

It often happens that users need to relocate the destination of the log in Octane. You can follow the instructions given below to change the log location in Octane:

  1. Inside the Octane installation location, you need to open log4j2-conf.xml file for editing purpose. 

The most obvious path would be:

In Linux: /opt/octane/conf

In Windows: <drive>\<path>\octane\conf

  1. Then you need to find the string:
<Property name="LOG_FOLDER">
  1. Then you need to change the value to the recent new log location, an example for that is given below:

In Linux: /opt/octane/log

You need to note that for Linux Operating System it could be crucial to set the permissions for the specific “Octane” group, octal: rwxrwx— (770)

In Windows: D:/octane/log

You need to note to use the forward slashes carefully, or it will not be applicable.

  1. Do not forget to save the changes, or else all the progress will be lost.
  2. Then you need to restart the Octane service properly. 
  3. After that, you need to verify that the logs were written accurately to the recent new location.

4. Instructions to solve the Flash error on TruClient Browser in LoadRunner Enterprise 2020 SP3

It often happens that Flash does not display on TruClient Browser in LoadRunner Enterprise 2020 SP3. TruClient Browser is a renowned browser, and it is based on the Mozilla techno, after the Mozilla Firefox upgraded to the version 77. It could be that there is a bug due to which the browser is unable to display Flash components accurately in some situations. Then the same bug is brought to the TruClient Browser when it is updated/upgraded to version 77 in LoadRunner Enterprise 2020 SP3.

You can reproduce these steps:

  1. You need to create a new TruClient script.
  2. Then you need to open the Runtime Settings, then find the Replay section and click on it. 
  3. Then you need to inspect it and check the “Enable global plugins support (TruClient Browser only)”
  4. After you have been directed, you will see that the Flash did not show properly.

You can solve the above-mentioned error by following the instructions given below:

Fix 1: 

Here you need to add a Reload step after the navigation step, only if the navigated url has a Flash component. 

Then you need to add the Reload step for the very first flash url navigation; the following url navigations would suffice as well.

Fix 2:

For this fix, you need to carefully go step-by-step:

  1. You need to delete the following folder:
 %appdata%\Hewlett-Packard\LoadRunner\WebTruClientBrowser
  1. And for the existing scripts, you need to open the script folder and find the folder Profiles. If you are unable to find this folder, then that is fine. If you find the folder, then you need to go to the TruClientabrowser, then open the user.js file.

Then you need to find the particular line with the following content:

user_pref("plugin.scan.plid.all", false);

After that, you need to change the value from “false” to “true.

  1. Then you need to open the folder:
%lg_path%dat\WebTruClientBrowser

After that, you need to open the user.js and then locate the line with the following content:

user_pref("plugin.scan.plid.all", false);

After that, you need to change the value from “false” to “true.

After you are done with the existing scripts, then the newly created scripts will work properly.

5. Instructions regarding the addition of runs to trend reports failure

It often happens that users face problems when they add runs to trend reports in upgraded projects. What actually happens is that the database’s trend runs sequence is not updated with the recent total number of trend runs in the project. This eventually results in addition of a new run with the previous remaining PCT_ID (the primary key), and due to that this action fails.

To reproduce, you can follow the steps given below:

  1. You need to log in to a project that was earlier upgraded from LTE 2020 to 2020 SP2. 
  2. Then you need to visit the Trend Report, under the Analysis and then the Performance Trending.
  3. After that you need to create a new report. 
  4. Then you need to add runs to the report. Then no new changes appear, and the action results in complete failure.

It usually occurs while upgrading a project from LRE 2020. The actual sequence TREND_RUNS_SEQ does not get updated; it should go to the highest PCt_ID in the TREND_RUNS table and increment it later by one.

This problem can be fixed. You just need to follow the instructions given below:

  1. First, while using Microsoft SQL Management Studio, you need to connect to the database environment.
  2. Then you need to find the relevant project’s schema in all the Databases.
  3. Then in the project schema, you need to go to Programmability

After that, you select Sequences then dbo.TREND_RUNS_SEQ.

  1. Then you need to click on the Restart Sequence check box to set the input field to the highest PCT_ID in the TREND_RUNS table, then increase it by one.
  2. You need to carefully check and confirm that the sequence value equals the maximum value in the TREND_RUNS table.
  3. Instructions on making a user entity if its username starts with a digit

It often happens that LoadRunner Enterprise comes across an error that automatically makes a user entity when the username begins with a digit. While on the other hand, the application displays a validation message that doesn’t let the user create an entity at all.

You can fix this issue quite easily by following the steps given below:

  1. You need to confirm accurately that no one utilises LoadRunner Enterprise in any condition.
  2. Then you need to download hotfix and then extract its contents.
  3. Then you need to visit:

 <LRE installation directory>\PCWEB_ADMIN 

Then make sure to take the backup of the authentic origin folder ADMINX.

  1. Now you need to copy the ADMINX folder from hotfix to the <LRE installation directory>\PCWEB_ADMIN folder.

7. Instructions to log in properly from the Identity change utility

It often happens that in LRE 2020 SP2, SP3 users are unable to login from Identify change utility. The error window title being: 

lre Site management login details Initialization Error
Unable to connect to LRE server 
Please make sure that your login username and password are correct and try again.

In LRE 2020, SP2 and 2020 SP3, recently a new schema is introduced: 

lre_site_management schema

It was newly introduced in SP2 and then was directed and carried over to SP3.

When the Identity change utility is initiated, it automatically connects to the Management Schema.This error can be easily tackled as well; all you have to do is follow the instructions given below:

The Management Schema does not authenticate LDAP users you need. So, you need to use the original Admin user credentials that the user was provided with during the application configuration, do not select any LDAP.user.

8. Unable to generate an analysis report for large result sets

Getting Parsing error with large result sets (less than 2 GB).:

Parse Command line error:

Unable to cast COM object of type ‘System._ComObject’ to interface type ‘Borland.Vcl.Fields’. This operation failed because the QueryInterface call on the COM component with IID ‘{XXXXXXXXXXXX}’ failed due to the following error:

No such interface supported. (Exception from HRESULT XXXXXXXXX (E_NOINTERFACE)).

Note: Small result sets work just fine on the same machine.

The cause is due to taking a lot of resources. The workaround is to change the Data collection option from “Generate Summary data while generating complete data’ (third option which is the default) to “Generate Complete data” which is the second option in the Analysis which is available under Analysis —-> Tools

9. Verify the arguments provided in web_set_certificate_ex() are correct

  • On the vugen machine, open a DOS window and navigate to LoadRunner Installation bin folder (i.e. <LoadRunner>\bin).
    • Type in: openssl and hit <enter>
  • Type in: s_client -connect <host:port> -cert <certificate name along with path in PEM format> -key <the path to the private key to use in PEM format> -passwd <the private key password>

If the above command works, then the arguments provided in web_set_certificate_ex() are valid.

Example: s_client -connect ivorde.ro:443 -cert example.pem -key keyex.pem -pass 1234

10. VuGen gives exception error at the end of the recording or during replay due to thumbnails

If you are getting the following pop-up error at the end of the recording:

AXWIN Frame Window: thumbprocess.exe – Application error

The instruction at ” 0x7dc995fe” referenced memory at “0x02b87cf4”. The memory could not be “read”.

Click on OK to terminate the program. Click on CANCEL to debug the program.

The workaround is as follows:

  • Press “start” -> “run”
  • Type “regedit”
  • Press “Ok”
  • Navigate to “HKEY_LOCAL_MACHINE/SOFTWARE/Mercury Interactive/LoadRunner/Vugen/Thumbnails”
  • Double-click on “GenerateThumbs,” and set the value to 0.

Now try doing a recording (or replay if the issue was during replay) with VuGen