Micro Focus Application Performance Management – Tips And Tricks

Table of Contents

Application Performance Management – Tips And Tricks – August 2021

1. How to overcome VC items being checked out during upgrade?

Can you please say the way to overcome the VC items being checked out during the upgrade? Or what to do if VC Filtering doesn’t exist in a VC project after the upgrade?

Solution

Follow the below written steps to overcome VC items:

Step 1: Remove the project using the Site Administration

Step 2: Alter the project’s dbid.xml file…From:<PR_HAS_VCSDB>Y</PR_HAS_VCSDB>

To: <PR_HAS_VCSDB>N</PR_HAS_VCSDB>

Step 3: Restore the project

Step 4: Verify, Repair, and Upgrade the project

Step 5: Enable the Version Control on the project by selecting the project and hitting the button in the Site Admin GUI

Step 6: Now all the entity versions will be set to zero where only the oldest entity will be opened. Update the history count for entities by issuing the following query to the db/schema…

Oracle

update <schema_id>.REQ set RQ_VC_VERSION_NUMBER=(select count(RQ_VC_VERSION_NUMBER) from <schema_id>.HIST_REQ where <schema_id>.REQ.RQ_REQ_ID=<schema_id>.HIST_REQ.RQ_REQ_ID);

update <schema_id>.BPM_MODELS set BPMM_VC_VERSION_NUMBER=(select count(BPMM_VC_VERSION_NUMBER) from <schema_id>.HIST_BPM_MODELS where <schema_id>.BPM_MODELS.BPMM_ID=<schema_id>.HIST_BPM_MODELS.BPMM_ID);

update <schema_id>.COMPONENT set CO_VC_VERSION_NUMBER=(select count(CO_VC_VERSION_NUMBER) from <schema_id>.HIST_COMPONENT where <schema_id>.COMPONENT.CO_ID=<schema_id>.HIST_COMPONENT.CO_ID);

update <schema_id>.RESOURCES set RSC_VC_VERSION_NUMBER=(select count(rsc_vc_version_number) from <schema_id>.HIST_RESOURCES where <schema_id>.RESOURCES.RSC_ID=<schema_id>.HIST_RESOURCES.RSC_ID);

update <schema_id>.TEST set TS_VC_VERSION_NUMBER=(select count(TS_TEST_ID) from <schema_id>.HIST_TEST where <schema_id>.TEST.TS_TEST_ID=<schema_id>.HIST_TEST.TS_TEST_ID);

MSSQL (SQL Auth)

update td.REQ set RQ_VC_VERSION_NUMBER=(select count(RQ_VC_VERSION_NUMBER) from td.HIST_REQ where td.REQ.RQ_REQ_ID=td.HIST_REQ.RQ_REQ_ID);

update td.BPM_MODELS set BPMM_VC_VERSION_NUMBER=(select count(BPMM_VC_VERSION_NUMBER) from td.HIST_BPM_MODELS where td.BPM_MODELS.BPMM_ID=td.HIST_BPM_MODELS.BPMM_ID);

update td.COMPONENT set CO_VC_VERSION_NUMBER=(select count(CO_VC_VERSION_NUMBER) from td.HIST_COMPONENT where td.COMPONENT.CO_ID=td.HIST_COMPONENT.CO_ID);

update td.RESOURCES set RSC_VC_VERSION_NUMBER=(select count(rsc_vc_version_number) from td.HIST_RESOURCES where td.RESOURCES.RSC_ID=td.HIST_RESOURCES.RSC_ID);

update td.TEST set TS_VC_VERSION_NUMBER=(select count(TS_TEST_ID) from td.HIST_TEST where td.TEST.TS_TEST_ID=td.HIST_TEST.TS_TEST_ID);

MSSQL (Win Auth)

update REQ set RQ_VC_VERSION_NUMBER=(select count(RQ_VC_VERSION_NUMBER) from HIST_REQ where REQ.RQ_REQ_ID=HIST_REQ.RQ_REQ_ID);

update BPM_MODELS set BPMM_VC_VERSION_NUMBER=(select count(BPMM_VC_VERSION_NUMBER) from HIST_BPM_MODELS where BPM_MODELS.BPMM_ID=HIST_BPM_MODELS.BPMM_ID);

update COMPONENT set CO_VC_VERSION_NUMBER=(select count(CO_VC_VERSION_NUMBER) from HIST_COMPONENT where COMPONENT.CO_ID=HIST_COMPONENT.CO_ID);

update RESOURCES set RSC_VC_VERSION_NUMBER=(select count(rsc_vc_version_number) from HIST_RESOURCES where RESOURCES.RSC_ID=HIST_RESOURCES.RSC_ID);

update TEST set TS_VC_VERSION_NUMBER=(select count(TS_TEST_ID) from HIST_TEST where TEST.TS_TEST_ID=HIST_TEST.TS_TEST_ID);

The version control will work properly and VC history will remain intact and the version count for each entity will be accurate

2. How to fix the upgrade of a project with lab extension to ALM 15.0.1 with patch 1?

Now hotfix enables upgrading of projects that are imported to ALM 15.0.1 with patch 1 from previous versions. Import project into the ALM15.01 Patch01 and upgrade would fail if it was created in ALM12.2x. Import project into ALM15.01 Patch01 and upgrade would fail if it was created in ALM12.5x or ALM12.6x and has performance center tests in it.

NOTE: This is specific to patch 1 for ALM 15.0.1

In patch 1 for ALM 15.0.1, some performance center subtypes are removed in a repair during project upgradation and this causes the upgrade failure

Solution

In ALM15.01 patch01, please apply the hotfix and upgrade the project again. Here are the steps to upgrade

 Step 1: Unzip the hotfix. Zip. Put the extensions folder directly under the “classes” folder located in the ALM deployment path.

The default path on Windows: “C:\ProgramData\Micro focus\ALM\webapps\qcbin\WEB-INF\classes”

The default path on Linux: “/var/opt/ Micro focus /ALM/webapps/qcbin/WEB-INF/classes”

Step 2: Restart ALM Server.

For the already failed projects, you may need the following steps to make it pass the upgrade after applying the hotfix.

Step 1. Back up the problematic project’s db

Step 2. Open the ‘PROJECTS’ table in the site admin’s db.

Step 3. Find the problematic project, update ‘PR_IS_ACTIVE’ from ‘R’ to ‘N’, update ‘PR_MAINTENANCE_STATE’ from 1 to 0.

Step 4. Then refresh the project list in site admin, upgrade the project again

3. Enforcing Password Complexity in the Quality Center.

QC does not include a mechanism to check password complexity therefore a workflow solution can be used to do it. 

Solution

We will provide you with all the steps needed.

Step 1: Add the following Site Configuration parameter

DISABLE_PASSWORD_OTA_ENCRYPTION = Y

Step 2: Secure the Customization>Workflow so the code cannot be altered

  • Click Tools>Customize>Groups
  • Select the Group(s)>Administration
  • Uncheck “Setup Workflow”

Step 3: Include the following workflow code

Note: this code is purely a suggestion. Changes can be made to adjust the complexity. See the comments in the below code to make these adjustments

‘Password Complexity Workflow for QC

Function CanLogin(DomainName, ProjectName, UserName)

  On Error Resume Next

  Set td = TDConnection

  strCurrentPassword = td.password

  If PasswordComplexity(strCurrentPassword) = False Then

     sValueOld= InputBox(“Your current Password does not meet minimum complexity requirements” & vbcrlf & vbcrlf & “You must change your password now” & vbcrlf & vbcrlf & “Enter Old Password”)

     sValueNew= InputBox(“Enter New password”)

     If PasswordComplexity(sValueNew) = False Then

        MsgBox “Password Complexity does not meet minimum requirments” & vbcrlf & vbcrlf & “You’ll now be disconnected”

        CanLogin = False

     Else

            td.changepassword sValueOld,sValueNew

         CanLogin = True

     End If

  End If

  ‘CanLogin = DefaultRes

  On Error GoTo 0

End Function

Function PasswordComplexity(strValue)

  Dim intMinLength

  Dim bolChangePassword

  Dim intCountA

  Dim intCountB

  Dim strLetter

  Dim strCurrentPassword

  Dim intUCaseMin

  Dim intLCaseMin

  Dim unNScharMin

  Dim intUCaseCount

  Dim intLCaseCount

  Dim inNSCharCount

  intUCaseMin = 1  ‘set this value to specify the minimum number of upper case characters required in a password

  intLCaseMin = 1  ‘set this value to specify the minimum number of lower case characters required in a password

  intNScharMin = 1 ‘set this value to specify the minimum number of numbers AND special characters (symbols) required in a password

  intMinLength = 1 ‘set this value to specify the minimum number of total characters required in a password

  intUCaseCount = 0

  intLCaseCount = 0

  intNSCharCount = 0

  bolChangePassword = False

  If Len(strValue) < intMinLength  than bolChangePassword = True

  msgbox “enter loop”

  For intCountB = 1 to Len(strValue)

      strLetter = Mid(strValue,intCountB,1)

      ‘Check for upper case characters

      For intCountA = 65 to 90 ‘check for letters A thru Z inclusive (upper case)

          If strLetter = chr(intCountA) Then

                intUCaseCount = intUCaseCount + 1

          End If

      Next

      ‘Check for lower case characters

      For intCountA = 97 to 122 ‘check for letters a thru z inclusive (lower case)

          If strLetter = chr(intCountA) Then

                intLCaseCount = intLCaseCount + 1

          End If

      Next

      ‘Check for numbers

      For intCountA = 48 to 57 ‘check for numbers 0 thru 9 inclusive

          If strLetter = chr(intCountA) Then

                intNSCharCount = intNSCharCount + 1

          End If

      Next

      ‘Check for special

      For intCountA = 33 to 41 ‘check for special characters shift 0 thru shift 9 inclusive

          If strLetter = chr(intCountA) Then

                intNSCharCount = intNSCharCount + 1

          End If

          ‘check for custom special

          If strLetter = chr(43) then intNSCharCount = intNSCharCount + 1 ‘check for “+”

          If strLetter = chr(45) then intNSCharCount = intNSCharCount + 1 ‘check for “-“

          If strLetter = chr(61) then intNSCharCount = intNSCharCount + 1 ‘check for “=”

          If strLetter = chr(95) then intNSCharCount = intNSCharCount + 1 ‘check for “_”

      Next

  Next

  If intUCaseCount < intUCaseMin or intLCaseCount < intLCaseMin or intNSCharCount < intNScharMin or bolChangePassword = True Then

     bolComplexityMet = False

  Else

     bolComplexityMet = True

  End If

  PasswordComplexity = bolComplexityMet

End Function

4. How to schedule test sets to run periodically?

The RunTestSet Scheduler available in KM191021 is relevant for QC 9. x. This version replaces that version for newer iterations of QC/ALM.

I am unable to schedule test sets to run periodically for QC/ALM. Please provide any assistance if you.

Solution

There is no built-in method to accomplish this, so users can create their logic using ALM Open Test Architecture (OTA) API to implement their personalized functionality. Below users can find a sample/demo implementation using the mentioned suggestion

This revised version of the RunTestSet is written using Visual Basic .Net 2010 and addresses an issue in the previous version where QTP or BPT test types pinned to a Baseline cause an error.

The same switches which applied in the previous version are identical in this version.

Introduction

Problem. ALM enables users to create sets of tests (test sets) and plans their execution: start time, planned host or host group, dependency. But there is no option to schedule these test sets to run periodically. ALM today does not have a built-in test set scheduler.

Solution. The existing OTA API enables to run of external tools that can execute any test set on any host. For example, the RunTestSetSet application (with VB.Net 2010 source code) is supplied as part of the proposed solution.

Note: If there are problems with the mentioned unsupported-provided-AS-IS tool, ensure that problem is not occurring without it, before involving HP Support Personnel.

Any scheduler application can be used to launch a RunTestSet application, for example, Microsoft Scheduler (part of Windows installation).

RunTestSet Application

RunTestSet is a windows console program that can be executed from the command line. This program can execute a specific test set. All parameters needed to specify a test set RunTestSet reads from the command line.

Syntax:

RunTestSet /s:Server /d:Project /u:User /p:Password /f:Test setFolder [/t:Test set] [/h:Host] | [/g:HostGroup]

Where:

/s:  ALM server name

/n:  ALM Domain

/d:  ALM Project

/u:  User name

/p:  User password

/f:  Test set Folder Path

/t:  [optional] Test set name

/h:  [optional] Host name

/g:  [optional] HostGroup name

/m:  [optional] User Name who will receive a notification mail if the Test set Failed

/l:  [optional] Run TestSet locally (True = Local, False = Remote)

5. ALM Groups>Users Audit utility

Is it necessary to audit which users are in which groups in an ALM project? Do we also require that this should be done for all Domains>Projects?

Solution

It may be necessary to understand which users are in which project(s) and in which group(s). The ALM Groups>Users Audit tool outputs user membership by the group for an individual project or all projects. The output is to XML which offers greater functionality and portability. The utility is attached: ALM Groups Users.zip. Before using be sure to read the documentation: ALM Groups Documentation.pdf

The XML format output can be imported to Excel where it is possible to filter on Domain, Project, Group, and User.

Note: This utility uses standard ALM login and API login types. See: API Key Overview

The “ALM Project>Groups>Users Audit Tool” is provided for example purposes only It is not supported by Micro Focus International plc.

6. How to add a .html or .htm file and add a link to it from the ALM splash page?

I do work on an Html or .htm file. It is sometimes very useful to add a .html or .htm file to ALM and create a link to the file on the ALM splash page. But I don’t know how to do it.

Please help me.

Solution

You can do this by editing the “index. JSP” directly under the “qcbin” folder, typically the path…

Windows: <drive>\ProgramData\Micro Focus\ALM\webapps\qcbin

Unix: /var/opt/ALM/webapps/qcbin

Place your own .html or .htm file in the “qcbin” folder, mind the name of the file

Open the “index.jsp” for editing. In the “main_form” header you can add some lines of code. What has been added has the comment: <!– Added Line. –>

<li><a href=”addins.html” target=”_blank”>Tools</a>

<li><a href=”Help/readme/Readme.htm” target=”_blank”>Readme</a>

<li><a href=”testing.htm” target=”_blank”>Testing</a> <!– Added Line. –>

Save the changes to the index.jsp file.

Access the ALM splash page, the link should appear and work.

Note: no restart or the ALM service or server is necessary

7. Project Verify Issue: The current text search feature is not configured well

During project Verify when Oracle has used the message “The current text search feature is not configured well” appears

When Oracle is used during project Verify, the message “The current text search feature is not configured well” appears. CTXAPP role is not granted and/or text search indexes are missing or damaged.

Solution

Do follow the steps below to fix the problem.

Step 1: Log in to Oracle as CTXSYS and issue this query: modified_drdefus.sql

Step 2: If not already granted, grant CTXAPP role as default. This can be done by issuing the following queries to the Oracle schema ID…

GRANT “CTXAPP” TO “<schema_id” ;

ALTER USER “<schema_id” DEFAULT ROLE “CTXAPP”;

For example…

GRANT “CTXAPP” TO “CUSTOMER_TEXTSEARCH_DB” ;

ALTER USER “CUSTOMER_TEXTSEARCH_DB” DEFAULT ROLE “CTXAPP”;

Step 3: Drop Text Search indexes on the project schema in Oracle by issuing the following…

DROP INDEX BG_TS_IX;

DROP INDEX BPME_TS_IX;

DROP INDEX BPMM_TS_IX;

DROP INDEX BPMP_TS_IX;

DROP INDEX CO_TS_IX;

DROP INDEX CS_TS_IX;

DROP INDEX DS_TS_IX;

DROP INDEX RN_TS_IX;

DROP INDEX RQ_TS_IX;

DROP INDEX TS_TS_IX;

commit;

3a) Optionally you can parameterize the “DROP INDEX” queries by populating the schema namd in the “<scheme_name>” using the following.

define p1_project_user_schema = <schema_name>;

DROP INDEX &&p1_project_user_schema .BG_TS_IX;

DROP INDEX &&p1_project_user_schema .BPME_TS_IX;

DROP INDEX &&p1_project_user_schema .BPMM_TS_IX;

DROP INDEX &&p1_project_user_schema .BPMP_TS_IX;

DROP INDEX &&p1_project_user_schema .CO_TS_IX;

DROP INDEX &&p1_project_user_schema .CS_TS_IX;

DROP INDEX &&p1_project_user_schema .DS_TS_IX;

DROP INDEX &&p1_project_user_schema .RN_TS_IX;

DROP INDEX &&p1_project_user_schema .RQ_TS_IX;

DROP INDEX &&p1_project_user_schema .TS_TS_IX;

commit;

Step 4:In the site admin GUI, for the project in question, click the ‘Enable/Rebuild Text Search’

Step 5: Check to make sure the list of indexes listed in Step 3, (optionally 3a) are created in Step 4 by issuing the following query…

select * from dba_indexes where ityp_owner = ‘CTXSYS’ and ityp_name in (‘CONTEXT’, ‘CTXCAT’, ‘CTXRULE’, ‘CTXXPATH’) and owner = ‘<schema_name>’ order by index_name;

For example…

select * from dba_indexes where ityp_owner = ‘CTXSYS’ and ityp_name in (‘CONTEXT’, ‘CTXCAT’, ‘CTXRULE’, ‘CTXXPATH’) and owner = ‘DEFAULT_ALMDEMO_DB’ order by index_name;

The project should now pass Verify for Text Search functionality

8. Identity Key attribute sample using SSO with ADFS as IdP.

The following information will provide some guidance on how to set the Identity Key attribute on the IdP side so ALM can use it to authenticate a user.

The following information will provide some guidance on how to set the Identity Key attribute on the IdP side so ALM can use it to authenticate a user.

The samples shown are related to Microsoft Active Directory (ADFS) which is a common Identity Provider software.

Prerequisites

Configure SSO settings as defined on the ALM Online Help:

adm help microfocus.com > alm > en > latest > online help > Content > Admin > sso preparation.htm

Solution

We recommend using IdentityKey as the name of the rule. If you use another name for the rule, update SSO configuration in ALM and edit the Identity Key field accordingly.

§  Samples

Create a rule based on an LDAP Attribute

This sample uses the LDAP email attribute as the value to use as the Identity Key.

Therefore, ’email’ should be mapped to the Identity Key field inside the SSO configuration in ALM.

Create a rule using custom code

In this example, ‘userName’ is to be mapped as IdentityKey value inside SSO Configuration in ALM.

Also, it uses sAMAccountName as the Identity Key value to authenticate.

More information on how to create ADFS rules is found here:

Docs microsoft.com > en us > windows server > identity > ad fs > operations > configure claim rules

ALM forum about the subject:

community microfocus.com > t5 > ALM QC User Discussions > sso setup on alm 15 0 > m p > 2763235

9. How to enable SSO logs on ALM 15?

There might be a need to enable enhanced ALM logs while troubleshooting Single Sign On (SSO) related issues.

Prerequisites

The ALM Service Provider component (OSP) has to be deployed before enabling SSO logs. This is done by running run_osp_deploy.bat/run_osp_deploy.sh as instructed on the ALM SSO configuration guide.

Solution

Enabling SSO logs

Step 1: Edit the basic.properties file located at ‘<DRIVE>\ALM repository\sa\DomsInfo\osp\basic.properties’.

Step 2: Set the property: ‘logging.level=ALL’

Step 3: Restart the ALM service.

Step 4: Reproduce the falling action and collect wrapper.log file from ‘<DRIVE>\ALM Deployment\ALM\log’.

The wrapper log should now include OSP details as shown below:

More information is found on the ALM Online Help:

adm help.microfocus.com > alm > en > latest > online help > Content > Admin > sso step 3 deploy sso components.htm 

10. MF Connect – Unable to map ‘Assigned To’ in ALM Defects

MF Connect is unable to map ‘Assigned To’ in ALM Defects There is no error, simply mapping the field is not possible. This is caused by an integer value in the SF_ROOT_ID field within the SYSTEM_FIELD table for the field BG_RESPONSIBLE (Assigned To) in the ALM project dB/schema.

This field, by default, is null, and having an integer value in the SF_ROOT_ID field for the BG_RESPONSIBLE field isn’t usually a problem.

However, in the case of MF Connect, perhaps other contexts, it can present an issue.

In this case, the field cannot be mapped.

Solution

Use the following procedure to correct this issue…

In Oracle directly…

update <schema_id>.system_field set sf_root_id = null where sf_column_name = ‘BG_RESPONSIBLE’;

commit;

In MSSQL Mgmt Studio directly…

update dbo.system_field set sf_root_id = null where sf_column_name = ‘BG_RESPONSIBLE’

Or…

update td.system_field set sf_root_id = null where sf_column_name = ‘BG_RESPONSIBLE’

Or within the ALM Site Administration…

Step 1: Select the Project in question

Step 2: Expand the table structure

Step 3: Select the SYSTEM_FIELD table

Step 4: Paste the following query in the query textbox…

             update system_field set sf_root_id = null where sf_column_name = ‘BG_RESPONSIBLE’

Step 5: Click the “Execute SQL” button to the right of the query textbox

Note: a successful run of the query will display “Empty Table” in the main view

Next, because values are cached we need to alter the customization in ALM to refresh the cache.

Step 1: Log in to the ALM project in question

Step 2: Click Tools>Customize

Step 3: Select “Project Entities” in the left column

Step 4: In the main view expand the “Defect” item

Step 5: Select “User Fields”

Step 6: Click the “New Field” button on the top toolbar

Step 7: In the field details change the “Type” to “Lookup List”

Step 8: In the lower area click the “New List” button

Step 9: Give the list a name, something like “TempList”

Step 10: Click okay, the Project List Dialog should open

Step 11: Click “New Item”, give it some value like “a”

Step 12: Click OK

Step 13: Click the “Save” button in the top toolbar

Step 14: Exit the project customization

Step 15: In the Customization Changes dialog select the “Major Change” radio button, then click OK.

Back in the project view, we need to reverse what was done above…

Step 16: Click Tools>Customize

Step 17: Select “Project Entities” in the left column

Step 18: In the main view expand the “Defect” item

Step 19: Select “User Fields”

Step 20: Select the field added in Step 6, note the lookup list using

Step 21: Click “Delete Field” in the top toolbar, click yes to confirm

Step 22: Click the “Save” button in the top toolbar

Step 23: In the left column select “Project Lists”

Step 24: In the Project Lists view select the list created in Step 9

Step 25: Click the “Delete List” button in the top toolbar, click Yes to confirm

Step 26: Click the “Save” button in the top toolbar

Step 27: Exit the project customization

Step 28: In the Customization Changes dialog select the “Major Change” radio button, then click OK.