Micro Focus Application Performance Management – Tips And Tricks

Table of Contents

Application Performance Management – Tips And Tricks – July 2021

1. How to rapidly change all the databases used by ALM

How can I change all the databases being used by ALM? Provide any assistance if you can.

Solution

Note: this assumes the new and old databases are of the same type, either both Oracle or MSSQL. This also assumes db/schema passwords remain consistent. If database passwords are different refer to the following articles…

Oracle: How to quickly change all the passwords for all ALM related schemas using Oracle

MSSQL: How to quickly change all the passwords for all ALM related databases using MSSQL when SQL Authentication (mixed-mode) is used

You can follow the below written steps:

Step 1: Log in to the ALM Site Admin

Step 2: Select the “DB Servers” tab

Step 3: The existing (old) database server should be listed

Step 4: Add the new database server

Step 5: Click the “Ping” to make sure the connection is successful

Step 6: Take the new database by creating a new blank project. Do not delete this project or manipulate projects for now. Leave the new project intact as we’ll use it later

Step 7: Note the value of the database name in the far left of the GUI. Copy this to a notepad

Step 8: Make note of the Connection String value. Copy this to a notepad

Step 9: Stop the ALM service.

Have the DBA backup all the ALM related db/schemas on the source database instance and restore the same on the target database instance

Navigate to and open the “siteadmin.xml” file. Typical paths….

Windows: <drive>\ProgramData\Micro Focus\ALM\webapps\qcbin\WEB-INF\siteadmin.xml

Linux: /var/opt/ALM/webapps/qcbin/WEB-INF/siteadmin.xml

Backup the file; in case something goes wrong

Identify the element: DbUrl

Alter the connection string element value by specifying the new value noted in Step 8, for example…

Existing value: <DbUrl>jdbc:sqlserver://tm-sql2014:1433</DbUrl>

New value: <DbUrl>jdbc:sqlserver:// tm-sql2017:1433</DbUrl>

Save changes

Before closing the siteadmin.xml file make note of the “DbName” element value, for example…

<DbName>qcsiteadmin_db</DbName>

In the above example, the element value is: qcsiteadmin_db

This is the Site Admin db/schema name

Have the DBA create a backup of the site admin db/schema as noted in Step 15

Open a query tool for the database in question. For example…

For MSSQL use SQL Server Management Studio (SSMS)

For Oracle use Oracle SQL Developer, TOAD, or similar

Connect to the new database

Update the table PROJECTS in the site admin database (noted in step 16) using a correlated sub query that uses the data from the new project created in Step 6…

Oracle (specify the site admin schema name)…

UPDATE <site_admin_schema_name>.PROJECTS SET DB_CONNSTR_FORMAT = (SELECT DB_CONNSTR_FORMAT FROM <site_admin_schema_name>.PROJECTS WHERE project_id = (select max(PROJECT_ID) from <site_admin_schema_name>.PROJECTS));

UPDATE <site_admin_schema_name>.PROJECTS SET DBSERVER_NAME = (SELECT DBSERVER_NAME FROM <site_admin_schema_name>.PROJECTS WHERE project_id = (select max(PROJECT_ID) from <site_admin_schema_name>.PROJECTS));

commit;

MSSQL w/SQL Auth…

UPDATE td.PROJECTS SET DB_CONNSTR_FORMAT = (SELECT DB_CONNSTR_FORMAT FROM td.PROJECTS WHERE PROJECT_ID = (select max(PROJECT_ID) from td.PROJECTS))

UPDATE td.PROJECTS SET DBSERVER_NAME = (SELECT DBSERVER_NAME FROM td.PROJECTS WHERE PROJECT_ID = (select max(PROJECT_ID) from td.PROJECTS))

MSSQL w/WinAuth…

UPDATE PROJECTS SET DB_CONNSTR_FORMAT = (SELECT DB_CONNSTR_FORMAT FROM PROJECTS WHERE PROJECT_ID = (select max(PROJECT_ID) from PROJECTS))

UPDATE PROJECTS SET DBSERVER_NAME = (SELECT DBSERVER_NAME FROM PROJECTS WHERE PROJECT_ID = (select max(PROJECT_ID) from PROJECTS))

Start the ALM service

Next, the “dbid.xml” files for each project will have the old DB_USER_PASS value instead of the new one.

With the new encrypted password in hand, Step 10 above, use the Modify Dbid utility from here: software support software grp.com > doc > KM02267685

This utility can be used to update some or all project “dbid.xml” files at once

2. SSO Configuration on ALM 15.0.1 failing-After uploading the Keystore from the SSO UI the resulting basic.pfx is empty!

After uploading the Keystore from the SSO UI the resulting basic.pfx is empty!

Running run_osp_deploy.sh the basic.properties file gets modified with a wrong Keystore encrypted password and the above written problem arises.

Wrapper log shows:

INFO  | jvm 1   | 2020/10/15 17:09:14.014 |      Load failed.: java.io.IOException: exception unwrapping private key – java.security.InvalidKeyException: Missing password

INFO  | jvm 1   | 2020/10/15 17:09:14.014 |            com.mercury.oracleutil.DDPKCS12KeyStoreProvider: null: unwrapKey: -1

INFO  | jvm 1   | 2020/10/15 17:09:14.014 |            com.mercury.oracleutil.DDPKCS12KeyStoreProvider: null: engineLoad: -1

Solution

You can look into below worked out steps for assistance:

Step 1: Generate a JKS Keystore file.

Step 2: Upload the file in SSO Configuration Tool directly.

Step 3: The basic.pfx in the repository folder is empty but the encrypted password should be correct.

Step 4: Test the basic.pfx and copy the JKS keystore created in step1 into the folder.

Step 5: Update basic.properties. Change three properties:

From: oauth-keystore.file={repository folder /sa/DomsInfo/osp/basic.pfx

To: oauth-keystore.file={repository folder}/sa/DomsInfo/osp/basic.jks

From: oauth-keystore.type=PKCS12

To: oauth-keystore.type=JKS

From oauth-key-alias=osp

To oauth-key-alias=<alias_from_keystore>

Step 6: Run deploy OSP script on all ALM nodes!

3. MS Edge and IE mode registry keys.

Sometimes due to lack of admin permissions or business restrictions, even after editing the related Group Policies mentioned in KM03638120, the related registry keys are not modified and the IE mode does not work.

Note: Before going any further make sure to comply with OS and environment minimum requirements by going to the links provided at the bottom. Running Windows Updates will make it a lot easier!

Solution 

To check if the registry keys exist in Win10 run the following commands from CMD with admin rights:

REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ /v InternetExplorerIntegrationLevel

REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ /v InternetExplorerIntegrationSiteList

**In case you receive an error message saying the keys were not found, or if the values received are not the expected ones, proceed to step 2. 

To create or update the keys run the following commands using an elevated CMD session as well:

REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ /v InternetExplorerIntegrationLevel /t REG_DWORD /d 1 /f

REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ /v InternetExplorerIntegrationSiteList /t REG_SZ /d file:///”C:/temp/site.xml” /f

**Make sure to enter the right path where your .xml file resides!

Enabling IE mode in MS Edge is thoroughly explained in the following links

Access ALM from the Edge Browser with IE mode enabled:

software support software grp.com > doc > KM03638120

IE mode compatibility: 

docs microsoft.com > en us > Deploy Edge > edge ie mode

IE mode troubleshooting:

docs microsoft.com > en us > deploy edge > edge ie mode faq 

4. ALM Explorer td links registry settings.

Can you tell me where are the ALM Explorer td links registry settings saved? A “td link” is normally included in an email originated from ALM itself and enables the recipient to go directly to the entity inside the ALM application. Based on the configuration and the registry keys mentioned below, “td links” will be automatically open in the Internet Explorer browser or ALM Explorer add-in itself.

Solution

Those settings are saved in the client machine’s registry under “HKEY_CURRENT_USER\Software\HPE\ALM Explorer\RunALMExplorer”

These are the corresponding values on the registry for each of the options selected in Tools>TD Links setup inside ALM Explorer UI:

Open all TD links in Internet Explorer:

The value will be 0, which is the default

Open all TD links in ALM Explorer:

The value will be 1, and you can specify the default ALM Explorer instance, and the different ALM Explorer installation that corresponds to different versions of ALM.

Td links will be opened for specified list only:

(Open all TD links in ALM Explorer for specific ALM versions only)

The value will be 2, and you must specify the different ALM Explorer instances that correspond to different versions of the ALM server, but you can NOT specify a default ALM Explorer for all links as in the previous option.

The following command might be useful to check the current value of the setting directly from the registry:

Note: Manual modification of this key is not recommended. Although it might be a good option when there is a need to apply the same policy to multiple machines and users in bulk.

REG QUERY “HKEY_CURRENT_USER\Software\HPE\ALM Explorer” /v RunALMExplorer

5. Date format [M/d/yyyy] added at the end of comments header in ALM 15.0.1.

The data format [M/d/yyyy] was added at the end of the comments header in ALM 15.0.1. But in some cases, it is relevant to add/remove the Date format at the end of the comments header. 

Solution

We now have a new site parameter to control the behavior of appending the date format.

Fix Version: QC/ALM v15.0.1

Add the following site configuration parameter

Parameter Name: SHOW_DATE_FORMAT_IN_COMMENT

Parameter Values: N or Y (Y is the default)

6. Not able to validate SSO configuration.

Now I’m unable to complete the request at this time. The “OSP Configuration” service (identifier “auth”) is not running. Please contact your system administrator.

Solution

This issue was caused because the “local” user in the “My Profile” tab was used, however, in the “Properties” tab it was configured “Enable Local Authentication” with “NO” value.

The validation passed after

1- Go to the “My Profile” tab and set the following:

IdP: alm

Identity Key: User Name

2- Encrypt xml metadata file using base 64 Format: https://www.base64encode.org/

7. Using SSO, Can we bypass the first ALM page which asks for just the user name?

SSO was configured. Once I Invoke the URL I get the following web page, which just asks me for the user name, which is from ALM. Then it points me to the federation URL to enter the user id and password. Upon completion of this, it takes me to the ALM login page showing the projects available.

Is there any way we can bypass the first ALM page which asks for just the user name?

note: Just the default IDP called alm is configured at this moment. 

Please let me know if we can bypass the first screen.

Solution

The scenario is caused because “Enable Local Authentication” has a “YES” value, basically, Discovery page functionality is activated. If you want to skip/disable this page, please go to the SSO configuration tool and set the value to “NO” in “Enable Local Authentication”.

Deploy SSO components again is required

8. How to prevent specifying an “ended” Release or Cycle in a Defect?

I’m having problems related to some cases. It might be desirable to prevent selection of an expired Release or Cycle in Defect Target Release, Target Cycle. This can be solved through the use of workflow in ALM

Solution

Function Bug_FieldCanChange(FieldName, NewValue)

  If FieldName = “BG_DETECTED_IN_REL” Then

  If RetrieveTR(NewValue) = True Then  ‘pass the name of the release

     Bug_FieldCanChange = DefaultRes

  Else

     msgbox “Release End Date has passed” & vbcrlf & vbcrlf & “Select a valid Release”

     Bug_FieldCanChange = False

  End If

  ElseIf FieldName = “BG_DETECTED_IN_RCYC” Then

  If RetrieveTC(NewValue) = True Then  ‘pass the name of the release

     Bug_FieldCanChange = DefaultRes

  Else

     msgbox “ReleaseCycle End Date has passed” & vbcrlf & vbcrlf & “Select a valid ReleaseCycle”

     Bug_FieldCanChange = False

  End If

  Else

  Bug_FieldCanChange = DefaultRes

  End If

End Function

Function RetrieveTR(RelName)

  Set relFactory = TDConnection.ReleaseFactory

  set RelFilter=   relFactory.filter

     RelFilter.filter(“REL_NAME”)=”””” & RelName & “”””

  Set listOfReleases = RelFilter.NewList

  Set ReleaseItem= listOfReleases.item(1)

  If ReleaseItem.DaysLeft > 0 Then

     bolAllowed = True

  Else

     bolAllowed = False

  End If

  RetrieveTR=bolAllowed

End Function

Function RetrieveTC(CycleName)

   Set cycFactory =TDConnection.CycleFactory

   Set cycFilter = cycFactory.Filter

   CycFilter.Filter(“RCYC_NAME” ) = “””” & CycleName & “”””

   Set listOfCycles = CycFilter.NewList

   Set CycleItem= listOfCycles.item(1)

   If CycleItem.DaysLeft > 0 Then

     bolAllowed = True

  Else

     bolAllowed = False

  End If

  RetrieveTC=bolAllowed

End Function

9. How to convert the ALM-OTA link to the ALM-REST link in ALM Synchronizer?

An internal tool in Synchronizer can convert an existing ALM-OTA link to REST. It is recommended to utilize a tool to convert OTA connections to REST links if you have an OTA connection issue or need to synchronize projects from two distinct ALM versions.

There will be an OTA connection issue if you install the wrong version of TDConnect or use an incompatible ALM (OTA) version in “Tools”->” Server Options”->” Micro Focus ALM Settings”->” ALM version”.

Typical OTA connection error messages include: 

1. “Automation Exception: The current version of the Application Lifecycle Management server: http://ServerName:8080/qcbin/wcomsrv.dll is incompatible with the OTA version. The OTA version is 12.21, and the OTA build number is 5417. Server build number: 389, server version: 12.60…”

2. “During the establishment of the TDConnection object, an unhandled exception occurred in the Connect method. On the Synchronizer server machine, it’s possible that the Micro Focus ALM client isn’t installed. Automation Exception: No such interface is supported,” says the error message.

When using OTA links to synchronize data between two ALM projects on different ALM servers, both ALM servers must have the same version loaded.

There is no need to install TDConnect or register an alm client with ALM-Rest, and projects from different ALM servers can be synced.

Solution

Synchronizer links can be converted from OTA to REST using an internal tool.

To access the tool, type in the following URL: <host> : <port>/ gossip/ OTA2REST.jsp.. <host> is the Synchronizer server.

For example: localhost: 7064 > gossip > OTA2REST.jsp

Steps to convert:

Step 1. Before converting, make a backup of the OTA connection.

Step 2. Go to host> :port> gossip > OTA2REST.jsp and fill out the form.

Step 3. Enter your user name, password, and LinkID in the appropriate fields. ‘User Name’ is the admin user name, ‘Password’ is the admin password, and ‘LinkID’ is the link id in the Postgres DB’s ‘Links’ database that contains the OTA link to be converted.

Step 4. Select “Convert” from the drop-down menu. The OTA link properties in the database will be changed to REST. 

Note: Relevant for ALM Synchronizer 15.0 SP1 and above.

10. How to remove Test Resource types “Monitor Over Firewall” and “Monitor Profile” from a project?

In some instances, the Test Resource types “Monitor Over Firewall” and “Monitor Profile” may be removed. When a LoadRunner Scenario is saved to an ALM project, these are added to it. In some instances, the Test Resource types “Monitor Over Firewall” and “Monitor Profile” may be removed. When a LoadRunner Scenario is saved to an ALM project, these are added to it.

Solution

Step 1. Back up the project’s database/schema and file repository.

Step 2. Go to the project in question and log in.

Step 3. Navigate to the Test Plan.

Step 4. Change to Grid View

Only scenarios should be available if you filter by the ‘Type’ field with a value of “LR-SCENARIO.”

Step 6. Remove all test types named “LR-SCENARIO” from the Test Plan. This will also remove the scenario’s instances and runs (s)

Step 7. Open a tool at the database and issue the following query to the project db/schema…

delete from ENTITY_SUBTYPES where EST_ID in (‘Monitor Over Firewall’, ‘Monitor Profile’)

             delete from ENTITY_SUBTYPE_FIELDS where ESTF_SUBTYPE_ID in (‘Monitor Over Firewall’,’Monitor Profile’);

             update SEQUENCES set SQ_SEQ_VALUE=SQ_SEQ_VALUE+1 where SQ_SEQ_NAME=’ENTITY_SUBTYPE_REL_VERSION’;

(If you’re using Oracle, make sure to commit modifications or use the commit command.)

Step 8. Restart the ALM service – Because the values altered in the database are cached in ALM, the ALM service must be restarted.

Step 9. When you log in to the project, you’ll notice that the resource types “Monitor Over Firewall” and “Monitor Profile” are no longer available.