You are on page 1of 25

ALM/QC site Schema table user details query

SELECT DISTINCT
td.SESSIONS_HISTORY.USER_NAME, td.Users.full_name,
td.SESSIONS_HISTORY.DOMAIN_NAME, td.SESSIONS_HISTORY.CLIENT_TYPE,
td.SESSIONS_HISTORY.PROJECT_NAME
FROM td.SESSIONS_HISTORY INNER JOIN
td.USERS ON td.SESSIONS_HISTORY.USER_NAME = td.USERS.USER_NAME
WHERE (td.SESSIONS_HISTORY.CLIENT_TYPE = 'Quality Center Client UI')
order by td.SESSIONS_HISTORY.domain_name

select u.user_name, u.full_name

from users u, users_projects up, projects p

where u.user_id=up.user_id and up.project_id=p.project_id and p.project_name='DCT'

order by u.user_name

SELECT DOMAIN_NAME, PROJECT_NAME, DB_NAME, PR_IS_ACTIVE, DBSERVER_NAME FROM td.PROJECTS

SELECT START_TIME, USER_NAME FROM td.SESSIONS_HISTORY

select USER_NAME, MAX(START_TIME) from td.SESSIONS_HISTORY GROUP by USER_NAME

Requirement (REQ)

 Req ID (RQ_REQ_ID)
 Name (RQ_REQ_NAME)
 Description (RQ_REQ_COMMENT)
 Requirement Type (RQ_TYPE_ID)
 Is Folder (RQ_IS_FOLDER) – beware. This contains incorrect data (folders with
value “N”)
 Req Father ID (RQ_FATHER_ID) e.g. the folder id that the requirement is in.
 Risk (RQ_USER_03)

Requirement Types (REQ_TYPE)

 Requirement Type ID (TPR_TYPE_ID) – is foreign key for REQ.RQ_TYPE_ID


 Requirement Type Name (TPR_NAME) – e.g. “Folder”, “Business”, “Functional”
etc

Requirement Coverage (REQ_COVER) – maps requirements to test cases

 Requirement (RC_REQ_ID)
 Covering Entity ID (RC_ENTITY_ID)
 Coverage Type (RC_ENTITY_TYPE) – always seems to be “TEST”. Do not put this
in a WHERE clause or you will filter out requirements that do not have an associated
test case.

Test (TEST) – contains test cases

 Test ID (TS_TEST_ID)
 Test Name (TS_NAME)
 Execution Status (TS_EXEC_STATUS)

SELECT
REQ.RQ_REQ_ID AS 'Requirement ID',
REQ.RQ_USER_01 AS 'Req ID Project', -- this has the original REQ ID from proj
ect doco
REQ.RQ_REQ_NAME AS 'Requirement Name',
REQ.RQ_REQ_COMMENT AS 'Requirement Description',
REQ_TYPE.TPR_NAME AS 'Requirement Type',
REQ.RQ_USER_03 AS 'Risk'
FROM
REQ
JOIN REQ_TYPE
ON REQ.RQ_TYPE_ID = REQ_TYPE.TPR_TYPE_ID -- join to get the name of the req
uirement type e.g "Folder"
WHERE
TPR_NAME != 'Folder' -- Only retrieve requirements of type "Business" or "Fun
ctional"
ORDER BY
RQ_REQ_ID

SELECT
TEST.TS_TEST_ID AS 'Test ID',
TEST.TS_NAME AS 'Test Name',
TEST.TS_EXEC_STATUS AS 'Execution Status'
FROM
TEST
ORDER BY
TEST.TS_TEST_ID

SELECT
REQ.RQ_REQ_ID AS 'Requirement ID',
REQ.RQ_USER_01 AS 'Req ID Project', -- this has the original REQ ID from proj
ect doco
REQ.RQ_REQ_NAME AS 'Requirement Name',
REQ.RQ_REQ_COMMENT AS 'Requirement Description',
REQ_TYPE.TPR_NAME AS 'Requirement Type',
REQ.RQ_USER_03 AS 'Risk',
TEST.TS_TEST_ID AS 'Test Case ID',
TEST.TS_NAME AS 'Test Case Name',
TEST.TS_EXEC_STATUS AS 'Execution Status'
FROM
REQ
LEFT JOIN
REQ_COVER ON REQ.RQ_REQ_ID = REQ_COVER.RC_REQ_ID -- join requirements to te
st cases (REQ to REQ_COVER)
LEFT JOIN
TEST ON REQ_COVER.RC_ENTITY_ID = TEST.TS_TEST_ID -- join requirements to te
st cases (REQ_COVER to TEST)
JOIN
REQ_TYPE ON REQ.RQ_TYPE_ID = REQ_TYPE.TPR_TYPE_ID -- join to get the name o
f the requirement type e.g "Folder"
WHERE
REQ_TYPE.TPR_NAME != 'Folder' -- Only retrieve requirements of type "Business
" or "Functional"
ORDER BY
REQ.RQ_REQ_ID

1. Here are some helpful queries that I built for a dashboard for my company…
—Get status of all tests in a cycle
1. declare @completed float
declare @total float
declare @percentage float
declare @failed float
set @completed = (select count(DISTINCT(RN_TEST_ID))
from td.releases R
inner join td.Release_Cycles RC on r.Rel_ID = RC.RCYC_Parent_ID
inner join td.Cycle Cy on Cy_Assign_RCYC = RC.RCYC_ID
inner join td.TestCycl TC on TC.TC_Cycle_ID = Cy.CY_Cycle_ID
inner join td.Run Rn on Rn.RN_Test_ID = TC.TC_Test_ID
inner join td.Test TS on TS.TS_Test_ID = RN.RN_Test_ID
Where RCYC_ID = ’10’
AND Rn.RN_Execution_Date = DATEADD(DAY, DATEDIFF(DAY, 140,
GETDATE()), 0)
and rn.rn_status = ‘Passed’)
select distinct(ts_test_id) as ‘TestID’, ts_name as ‘Name’,
max(rn.RN_EXECUTION_DATE) as ‘Time’
into #tmpStatus
from td.Release_Cycles RC
inner join td.Cycle Cy on Cy_Assign_RCYC = RC.RCYC_ID
inner join td.TestCycl TC on TC.TC_Cycle_ID = Cy.CY_Cycle_ID
inner join td.Run Rn on Rn.RN_Test_ID = TC.TC_Test_ID
inner join td.test ts on ts.TS_TEST_ID = rn.RN_TEST_ID
Where RCYC_ID = ’10’
and rn.rn_execution_date = DATEADD(DAY, DATEDIFF(DAY, 140,
GETDATE()), 0)
group by ts_test_id, ts_name
order by TS_TEST_ID asc
select max(RN_RUN_ID) as ‘RunID’, RUN.RN_TEST_ID as ‘RunTestID’
into #tmpMaxRun
from td.RUN, #tmpStatus
where #tmpStatus.TestID = RUN.RN_TEST_ID
and RUN.RN_EXECUTION_DATE = #tmpStatus.[Time]
group by RN_TEST_ID
set @failed = (select count(RUN.rn_Status) as ‘Status’
from #tmpStatus
inner join #tmpMaxRun on #tmpStatus.TestID = #tmpMaxRun.RunTestID
inner join td.RUN on #tmpMaxRun.RunID = RUN.RN_RUN_ID
inner join td.TEST ts on ts.ts_test_id = #tmpstatus.testid
where RUN.rn_execution_date = DATEADD(DAY, DATEDIFF(DAY, 140,
GETDATE()), 0)
and RUN.RN_EXECUTION_DATE = #tmpstatus.[Time]
and RUN.rn_status = ‘Failed’)
Drop table #tmpStatus
Drop table #tmpMaxRun
set @total = (select count(DISTINCT(RN_TEST_ID))
from td.releases R
inner join td.Release_Cycles RC on r.Rel_ID = RC.RCYC_Parent_ID
inner join td.Cycle Cy on Cy_Assign_RCYC = RC.RCYC_ID
inner join td.TestCycl TC on TC.TC_Cycle_ID = Cy.CY_Cycle_ID
inner join td.Run Rn on Rn.RN_Test_ID = TC.TC_Test_ID
Where RCYC_ID = ’10’
AND Rn.RN_Execution_Date = DATEADD(DAY, DATEDIFF(DAY, 140,
GETDATE()), 0))
set @percentage = CAST((@completed/@total)*100 as Decimal (6,1))
select @total as ‘Total Tests’, @completed as ‘Passed Tests’, @failed as ‘Failed
Tests’, @percentage as ‘% Passed’
SELECT RCYC_Name As Cycle , cy_cycle as ‘Test Set’,
[Passed],[Failed],[No Run],[Blocked],[Not Completed],
([Passed]+[Failed]+[No RUN]+[Blocked]+[Not Completed]) as ‘Total Scripts’,
ROUND(Cast(([Passed]*100) AS FLOAT)
/
CASE WHEN ISNULL(CAST(([Passed]+[Failed]+[No RUN]+[Blocked]+[Not
Completed]) AS FLOAT),1) = 0 THEN 1 ELSE
ISNULL(CAST(([Passed]+[Failed]+[No RUN]+[Blocked]+[Not Completed]) AS
FLOAT),1) END,2) As ‘% Passed’
FROM
(
select RCYC_Name,cy_cycle,TC_STATUS
from td.TESTCYCL /*Test Instance*/
Inner Join td.Cycle on cycle.cy_cycle_id = testcycl.tc_cycle_id
inner join td.Release_Cycles on
testcycl.TC_ASSIGN_RCYC=Release_Cycles.RCYC_ID
inner Join td.Releases on Releases.Rel_id=Release_Cycles.RCYC_Parent_Id
where Rcyc_ID = ‘1001’
) AS MAIN
PIVOT
(
Count(TC_STATUS)
FOR TC_STATUS IN ([Passed], [Failed],[No Run],[Blocked],[Not Completed])
) as pvt

What table of QC contains user full name?

Set client = CreateObject("SAClient80MP.SAapi")


server = "Server"
saPassword = "Password"

client.Connect server, saPassword


response = client.GetAllUsers()
Set xmldoc = CreateObject("Microsoft.XMLDOM")
xmldoc.loadXML response
Set lst = xmldoc.getElementsByTagName("USER_NAME")
Set lst1 = xmldoc.getElementsByTagName("FULL_NAME")
Set lst2 = xmldoc.getElementsByTagName("EMAIL")
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\users.csv", 2, True)
f.WriteLine("QualityCenter User List, QualityCenter Full Name, User E-Mail")

For i = 0 To lst.length - 1
Set node = lst.Item(i)
Set node1 = lst1.Item(i)
Set node2 = lst2.Item(i)
f.WriteLine Trim(node.Text+", "+node1.Text+", "+node2.Text)
Next

f.Close
MsgBox "Finished!"

Quality Center Server logs are not created anymore


Quality Center (QC) or Application Lifecycle Management (ALM) server stops writing server
logs.

When the QC \ ALM server is installed on a Linux\Solaris operating system and the log files
that are currently used by QC \ ALM process for writing are deleted, QC \ ALM server will
stop writing new logs until it is restarted.

Restart of the QC / ALM process resolves the situation


Create ALM encrypted password for the dbid.xml file
1. Locate dbid.xml file
For example). C:\ProgramData\HP\ALM\repository\qc\Default\demo\dib.xml
It is need dbid.xml file backup

2 . In Site admin->Site projects tab->domain_name->project_name select “DB user


Password” link under Project details tab.
Project is deactivated and you can type the new password
3. Remove the project
4. In Oracle Enterprise Manager edit project_db (project_name) user and type the new
password (same as from step 1)
5. Restore and activate the project
The password for qcsiteadmin schema may need to be changed with a new one when using
Oracle as a database in Application Lifecycle Management (ALM) 11. This can be achieved
by following the next steps.
Note that the new password will be only applied to ALM user password for qcsiteadmin
schema (different from project schema) and the projects password will not be affected.

Response

Before proceeding with the following steps and making any changes in site administration,
the best would be backing up the DB_USER_PASS value that is located in the qcsiteadmin
database/schema DBSERVERS table, or ideally backup the whole siteadmin
database(qcsiteadmin_db).

Steps to change the default ALM user password for ALM qcsiteadmin_db:

1. First the “Application Lifecycle Management User password” from Site Administration ->
DB Servers Tab should be changed with the new one.
This operation updates the DB_USER_PASS column (new password encryption) in the
DBSERVERS table in qcsiteadmin_db (Site Administration database/schema)
2. In Oracle Enterprise Manager edit qcsiteadmin_db user and type the new password (same
as one)
3. Go and display the contents of DB_USER_PASS column (new password encryption) in
the DBSERVERS table in qcsiteadmin_db (Site Administration database/schema) and copy
the encrypted value.
Save it somewhere.
4. On the application Server go to the ALM deployment location. For example it would be:

C:\ProgramData\HP\ALM\jboss\server\default\deploy\20qcbin.war\WEB-INF\

There you will find the siteadmin.xml file preserving information for the created siteadmin
schema.
Backup this file just in case.

Update:
< DefaultUserPassword>put_here_encrypted_password</DefaultUserPassword>
with the new (updated) DB_USER_PASS value from the DBSERVERS table
5. Save the changes in the siteadmin.xml file.
6. Go to the following location on your Server:
C:\ProgramData\HP\ALM\conf and edit the “qcConfigFile.properties”

Find the places where the old Encryption of the password is written and change it with the
new one. You need to focus over:

DefaultUserPassword=QCC\:PDvevcW2I7swsx85ave5GQ\=\=

7. Restart the HP ALM Service from Services.


8. Try logging to ALM Site Admin page and to any ALM project.
Note that this change does not affect projects’ user password and they will keep the old
ones.

Migrating data from sharepoint to ALM

There are 2 options

1. The first option is to export SharePoint data to Excel, then use Excel add-in to
import the data to ALM.

2. The second option is to develop additional third party adapters for requirements or defect
synchronization using the HP ALM Synchronizer Adapter Software Development Kit:
https://hpln.hp.com//page/hp-alm-synchronizer-adapter-software-development-kit-0

HP ALM Synchronizer only synchronizes defect/ requirement data between HP ALM and
Rational ClearQuest or Microsoft Team Foundation Server directly, for SharePoint.

Rename Entity Type dropdown list Item in ALM 11.00


To rename Resource Type or Test Type in Application Lifecycle Management (ALM) 11.00

For example:

QUICKTEST_TEST to QTP_TEST

First of all, because this is a database (DB) change, it is highly recommended to make a
back up of your project database before doing any changes on it.

Please follow these steps in order to change the name of resource type “Testing Activity”:

1. Login into your Site Administration

2. Navigate to your project in the tree


3. Expand its tables

4. Go to ENTITY_SUBTYPES Table

5. In the query box enter the following Query

For Test Type (QUICKTEST_TEST):

— this script will update the type visible in Test Plan

UPDATE ENTITY_SUBTYPES

SET EST_NAME=’QTP_TEST’ — the name you want to set

WHERE EST_ID = ‘QUICKTEST_TEST’ — you can check it in the same table

AND EST_ENTITY_TABLE_NAME = ‘TEST’

— this script will update the type visible in Test Lab

UPDATE ENTITY_SUBTYPES

SET EST_NAME=’QTP_TEST’ — the name you want to set

WHERE EST_ID = ‘QUICKTEST_TEST’ — you can check it in the same table

AND EST_ENTITY_TABLE_NAME = ‘RUN’

For Resource Type:

UPDATE ENTITY_SUBTYPES

SET EST_NAME=’Resource Type Name’ — the name you want to set

WHERE EST_ID = ‘Resource Type ID’ — you can check it in the same table

AND EST_ENTITY_TABLE_NAME = ‘RESOURCE’

6. Close your browser

7. Open your Temp folder (in windows explorer path enter %temp%)

8. Find and delete folder called “TD_80”


9. Open your browser again and load the HP ALM components

10. Login into the project and check the name of the type you have changed.

“Failed to Restore Project” error


Messages:

Failed to Restore Project;

Stack Trace:

org.bouncycastle.crypto.InvalidCipherTextException: pad block corrupted

at org.bouncycastle.crypto.paddings.PKCS7Padding.padCount(PKCS7Padding.java:63)

at
org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher.doFinal(PaddedBufferedBloc
kCipher.java:286)

at com.hp.sw.bto.ast.security.lwcrypto.LWBlockCrypto.decrypt(LWBlockCrypto.java:114)

wrapped in com.hp.sw.bto.ast.security.lwcrypto.LWCryptoException: Unable to finalize


decryption for the following 16 bytes: [ -49, 70, 121, 104, -37, -48, -11, -24, 77, -2, -69, 17,
52, -16, -27, -102, ], 0 bytes were already precessed. Current configuration is:
com.hp.sw.bto.ast.security.lwcrypto.LWBlockCrypto[ cipher: AES/CBC, Encoding mode:
Base64Url, forEncryption: false, keysize: 256]

at com.hp.sw.bto.ast.security.lwcrypto.LWBlockCrypto.decrypt(LWBlockCrypto.java:118)

at com.hp.alm.platform.crypto.QcCipher.decrypt(QcCipher.java:168)

Issue happens since the password in the dbid.xml does not match with the data in
Application Lifecycle Management (ALM).

Steps to fix the issue:

· Create a new project.

· Go to the repository of the newly created project.

· Open the dbid.xml file

· Copy the Password


· Open the dbid.xml file of the project we are trying to restore.

· Make sure the password is the same for both new and failed to restore project.

· If different change the password.

· Restore the project again.

Error HTTP 503 when trying to access Mtours


The error message appears when trying to access Mtours from Application Lifecycle
Management (ALM)

Error Message: HTTP 503

The cause of this problem is because Mtours is disabled by default if it was not enabled
during the intallation of ALM.

To fix this issue and enable Mtours, follow these steps:

1. Open and edit the “start.ini” file located in the following location:
C:\ProgramData\HP\ALM\server\conf

2. In the file locate the following line: jetty-testrealm.xml

3. Edit this line and remove the ‘#’ character at the beginning of the line.

4. Save and close the file

5. Restart the ALM server.

6. Check if the problem is resolved.

Error:” Invalid URL” when trying to login to Quality Center


When trying to login to Quality Center (QC) users receive the following error:

Invalid URL

The problem is caused by a product defect.

After a client machine has been used to connect to a Quality Center instance deployed via
SSL, subsequent connections to QC are attempted via port 443. This results in a failure to
connect to the application.
The defect is known to R&D and a fix is being prepared. The ETA for this patch is not yet
known.

The setting is stored in the registry. There are two ways to correct the wrong value:

1) Use the QC WebGate Customization Tool (available at http://qcserver:port/qcbin/Apps)


and uncheck the box labeled ‘Login SSL Mode’

2) Open regedit and navigate to the affected key:


HKEY_CURRENT_USER\Software\Mercury Interactive\TestDirector\WEB\LoginSSLMode.
The value should be changed from ‘Y’ to ‘N’.

How to proceed with the migration from ALM 11 to ALM 11.5 when the confidential data
passphrase is not known
If the Application Lifecycle Management (ALM) Configuration Wizard fails and in the
upgdare.txt log file the following error is logged:

ERROR: Unable to finalize decryption for the following 16 bytes:

This means that the used confidential data passphrase is wrong.

When upgrading from ALM 11 to ALM 11.5x and the confidential data passphrase is
unknown, the old "qcConfigFile.properties" file from ALM 11 which was used in the previous
installation needs to be used. This file has the encrypted confidential data passphrase inside.
It is stored in the <InString> key. This file needs to be placed in <ALM Deployment
Path/conf> of the new installation.

Note: Using this file will give the option to keep the current settings. Using this option allows
using the same passphrase and change the other values. This workaround will not extract
the password from the file.

Confidential Data Passphrase issues during migration of Lab Management project, when
migrating from ALM 11.0 to ALM11.5
What to do when Performance Center related Lab management project is migrated from
Application Lifecycle Management (ALM) 11.0 to 11.5 and the passphrase is wrong. If the
password is wrong or not known the Verify process will fail.

There are 2 ways to deal with the situation :

1. Fix the Confidential Data Passphrase of the server so it is the same as in the source
server (ALM11.0)

2. Reset the passwords in the Lab project before the Verify. Then after the upgrade login to
Lab Management and update the passwords of the AUT hosts, Diagnostic Server and
Standalone Unix Load generator.
More details may be found in the ALM Administrators guide Appendix A – Upgrade
preparation troubleshooting.- ‘Encrypted Values’.

Change the ALM user password for qcsiteadmin schema in Oracle database
The password for qcsiteadmin schema may need to be changed with a new one when using
Oracle as a database in Application Lifecycle Management (ALM) 11. This can be achieved
by following the next steps. Note that the new password will be only applied to ALM user
password for qcsiteadmin schema (different from project schema) and the projects password
will not be affected.

Before proceeding with the following steps and making any changes in site administration,
the best would be backing up the DB_USER_PASS value that is located in the qcsiteadmin
database/schema DBSERVERS table, or ideally backup the whole siteadmin
database(qcsiteadmin_db).

Steps to change the default ALM user password for ALM qcsiteadmin_db:

1. First the “Application Lifecycle Management User password” from Site Administration ->
DB Servers Tab should be changed with the new one.

This operation updates the DB_USER_PASS column (new password encryption) in the
DBSERVERS table in qcsiteadmin_db (Site Administration database/schema)

2. In Oracle Enterprise Manager edit qcsiteadmin_db user and type the new password (same
as one)

3. Go and display the contents of DB_USER_PASS column (new password encryption) in


the DBSERVERS table in qcsiteadmin_db (Site Administration database/schema) and copy
the encrypted value.

Save it somewhere.

4. On the application Server go to the ALM deployment location. For example it would be:

C:\ProgramData\HP\ALM\jboss\server\default\deploy\20qcbin.war\WEB-INF\

There you will find the siteadmin.xml file preserving information for the created siteadmin
schema.

Backup this file just in case.

Update:

<DefaultUserPassword>put_here_encrypted_password</DefaultUserPassword>
with the new (updated) DB_USER_PASS value from the DBSERVERS table

5. Save the changes in the siteadmin.xml file.

6. Go to the following location on your Server:

C:\ProgramData\HP\ALM\conf and edit the “qcConfigFile.properties”

Find the places where the old Encryption of the password is written and change it with the
new one. You need to focus over:

DefaultUserPassword=QCC\:PDvevcW2I7swsx85ave5GQ\=\=

7. Restart the HP ALM Service from Services.

8. Try logging to ALM Site Admin page and to any ALM project.

Note that this change does not affect projects user password and they will keep the old ones.

Change HP Sprinter 11.52 Port for communication with HP ALM

If the port for HP Application Lifecycle Management (ALM) server is different from the default
one 8080, this could bring some issues with HP Sprinter 11.52 because it is using that port.

In this situation this port could be changed with editing some configuration files in HP
Sprinter 11.52.

Follow these steps in order to change the Sprinter port:

1. Navigate to program files of the client machine.

2. Open ~/HP/Sprinter/Bin

Find the following three configuration files:

– Sprinter.exe.config

– SprinterAgent.exe.config

– SprinterRTE.exe.config

In each file find <add key="InspectionPort" value="8080"/> and change the port to some
other available port.
Save the changes and try to start Sprinter.

Fix the inconsistent permissions problem after an upgrade

In ALM 11.00 and above, you can experience the below issue in a project upgraded from QC
10.00, or a project newly created in ALM 11.00.

1.Manifestations of the problem:

a. In Customization->Groups and Permissions, group G is permitted to update field F in


entity E but I cannot update this field.

b. In Customization->Groups and Permissions, group G is permitted to update entity E but I


cannot update it.

c. In Customization->Groups and Permissions, group G is permitted to update entity E but I


cannot copy-paste it.

d. Or any other similar manifestations saying Customization allows update but update is
prevented in work in the modules themselves.

2. In ALM (11.00 and above) permission model, once a group G has at least the update
permission of a field F of a entity E, ALM should regard the update permission of E is also
granted to G .

However for some upgraded projects or new projects, by default we have the group G with
the update permission of a field F but without the update permission of its parent entity E.

This is what we call “Inconsistent Permission”.

3. Look in the Customization->Groups and Permissions UI to make sure that it is actually


permitted to update entity E. After that, the below SQL can help to identify any permission
inconsistency on a specific table.

Replace ‘<E>’ with the entity table name, and run this SQL in site admin, then if there’s any
inconsistency on the entity permission, the current permission (TB_GRANT_MODIFY) and
the correct permission (CORRECT_PERMISSION) will be listed.

SELECT TB_TABLE_NAME, TB_GRANT_MODIFY, SF_GRANT_MODIFY AS


CORRECT_PERMISSION FROM TABLES INNER JOIN SYSTEM_FIELD ON
TB_TABLE_NAME=SF_TABLE_NAME AND SF_CAN_CHANGE_PERMISSIONS=’Y’ AND
(SF_IS_SYSTEM=’Y’ OR SF_IS_ACTIVE=’Y’) AND
TB_GRANT_MODIFY<SF_GRANT_MODIFY AND TB_TABLE_NAME=’<E>’

In this case, the solution below might be relevant.


Solution

The fix for this problem is contained in ALM 11 and ALM 11.5 patches.

The fix uses a verifier and repairer that find inconsistencies for the given tables and fix them
by allowing entity update where it finds the update of at least one of their fields is permitted.

Note: the fix will always change the entity update permission from no to yes. So prior to use
it, please make sure you really want to grant the entity update permission to this group.

In order to use this fix, we need to:

Upgrade patch level:

· In ALM 11, upgrade the patch level to at least patch 14.

· In ALM 11.5 and further, upgrade the version to at least ALM 11.52 patch 1.

Instructions for ALM 11 patch 14 or later and for ALM 11.52 patch 1 or later :

1. Backup your projects.

2. Add the required site parameter – Add a site parameter named


“ENTITY_TABLE_NAMES_FOR_FIXING_UPDATE_PERMISSIONS_INCONSISTENCY”.
The value of this parameter should be a comma separated list of the entity table names
corresponding to the entities for which a problem was found in the TABLES table. For
example: “BUG,REQ”.

3. Repair all relevant projects – This will update the TABLES table to fix the inconsistencies
that were found.

Note: it’s possible to run “Repair” on a domain level – a one-click operation for all the
projects in a domain.

4. Return server to original state – Delete the site parameter added in step 2.

Note: You MUST return server to original state prior to project upgrade, otherwise some side
effect will take place during the project upgrade and will cause the upgraded project to be
unstable.

5. Once done, the problem should be fixed – Run the SQL above to see that no consistency
exists for those entities and check the functionality itself to see that the issue was fixed.

ALM 11: Configuration Wizard does not allow reinstallation


If Application Lifecycle Management (ALM) 11 needs to be reinstalled then the existing
qcsiteadmin_db database which is already on the current version needs to be used for the
reinstallation.

The Configuration Wizard cannot complete and results in error "Upgrade to 11.0 is not
supported" .

In order to instruct the Configuration Wizard to bypass the check of the Site Admin database
version, it is necessary to make the below steps. Then the ALM 11 Configuration Wizard
runs without facing the mentioned limitation:

1.Navigate to the ALM Platform installation directory, open the run_after_finish.bat or


run_after_install.sh file for editing.

2.Locate the rem set SKIP_VALIDATIONS line, and do the following:

a) Remove the rem command.

b) After the equal sign, add -wSaSchemaValidator :

set SKIP_VALIDATIONS=-wSaSchemaValidator

3.Save and close the file.

4.Run the file.

5.During the Re-configuration process choose “Upgrade existing schema” option.

NOTE: This limitation is fixed in ALM 11.5 Configuration Wizard which provides a new option
"Connect to existing schema / second node". That allows to reconnect to the same
qcsiteadmin_db and reinstall ALM 11.5.

After migration from QC 9.2 to ALM 11 problems with the group permissions

After migrating from Quality Center (QC) 9.2 to Application Lifecycle Management (ALM) 11
issues with the Group permissions could cause different problems.

Note: If the above is not the exact reason for using this fix, running this repairer will actually
cause a security breach exposing this entity for update. This is a situation that needs to be
avoided.

One such example would be that although a user belongs to a group with the permissions to
create and update design steps, the user also cannot create a new design step by copy and
paste. The ALM current permission model has a rule. If a group has the update permission
over at least one of an entity’s fields that is exposed in the permissions User Interface (UI), it
should also have the update permission over that entity. Before running this repairer there
might be an entity with permissions to update its fields, but without permissions to update the
entity itself for some group. In this situation, the entity is blocked in all or most use cases
from being updated in the database (DB). After running this repairer this entity will have
permissions for updating the entity. This means that in all use cases it will be allowed to
update this entity. And also, on the contrary, if an entity has the permission of updating itself
without the permission of updating its fields, running the repairer will lead to disabling
updating the entity.

It is caused by a change in the way that Group permissions work between QC 9.2 and ALM
11.

The problem could be fixed, by following the below steps:

1. Add the below contents to the following files:

"verify_tasks_deep.xml" and "repair_tasks.xml" under


"repository\sa\DomsInfo\MaintenanceData\conf".

For verify_tasks_deep.xml – <ENTRY


VALUE="com.mercury.td.saserver.maintenance.verify.EntityUpdatePermissionInconsistency
Task"/>

For repair_tasks.xml – <RepairData


class="com.mercury.td.saserver.maintenance.repair.EntityUpdatePermissionInconsistencyR
epairer"/>

2. Restart the ALM server.

3. Run the Project Repair Tool.

4. When the migration of the projects is done, remove the lines from the XML files

5. Restart the ALM server

Note: After adding the contents to these files, restarting ALM server, and repairing the
project, the greyed out buttons should be enabled.

Note: The above class is disabled (not declared in the list of verifiers/repairers) by default,
since it may contain a hidden risk. For example, in the above case, if the
"SYSTEM_FIELD.SF_GRANT_MODIFY" is incorrect, the repairer will always align
"TABLES.TB_GRANT_MODIFY" to it.

Note: It is very important to remove the lines from the XML files once the repair has finished
so other projects are not changed.

How to move defects from one database to another


Copy and paste defects from one project to another

In order to move defects from one TestDirector / Quality Center database to another, you
can use the "Copy" and "Paste" functions to copy and paste defects from one instance of
TestDirector to another instance of TestDirector.

1. Open one instance of TestDirector and connect to db1.

2. Open another instance of TestDirector and connect to db2.

3. With both databases opened, go back to the TestDirector instance with db1 and select the
records from the grid that you want to copy. You can create a filter for the defects you want
to copy. Right-click and choose "Select All" or go to Edit -> Select All.

4. Click on the Copy icon or go to Edit -> Copy.

5. Switch to the other instance of TestDirector with db2 and click on the Track Defects tab.

6. Click on the Paste icon or go to Edit -> Paste.

Note:

When copying defects, the Defect IDs are not copied. This is because these ID numbers are
managed by TestDirector / Quality Center to maintain uniqueness.

The field type and field length of the corresponding fields in both projects should match in
order to copy the data over. For more information, please consult your TestDirector / Quality
Center administrator and the Open Test Architecture guide. For Quality Center 9.0, refer to
the Mercury Quality Center Database Reference found in Quality Center under Help ->
Documentation Library.

Additionally please note that this will only work if both projects have the same customization.

Upgrade a Quality Center 10 project to Quality Center 11 on a new Microsof SQL


Database server

The following steps show one method to upgrade Quality Center (QC) 10 to QC 11

1. Deactivate the project in version 10.

(NB: If this is a version control project ensure all checked out entities have been checked in
before taking a backup of the project)

2. Make a DB backup of the QC project schema.


3. Make a backup of the QC 10 project folder from the repository on the file system.

4. Create a new project in QC 11 and name it the same way as the desired restored project
name.

5. Remove the newly created project from QC 11. (DO NOT DELETE IT)

6. Restore the DB backup of the QC 10 project schema in the new DB server on the schema
that was created when the new QC 11 project was created and restore project repository to
the new location.

7. Link the td user with the td login by executing the below SQL query on the restored project
schema in the DB server:

EXEC sp_change_users_login ‘update_one’, ‘td’, ‘td’

exec sp_change_users_login ‘report’

8. Edit the dbid.xml file. There is only 1 entry that needs to be edited from Y to N, please
check below:

PR_SMART_REPOSITORY_ENABLED>Y</PR_SMART_REPOSITORY_ENABLED>

to

PR_SMART_REPOSITORY_ENABLED>N</PR_SMART_REPOSITORY_ENABLED>

9. Delete the folder called "ProjRep" and leave just the already edited dbid.xml file.

10. Restore the project from Site Administrator.

11. Run the Verify tool.

12. Run the Repair tool if needed.

13. Upgrade the project.

14. Activate the project.

15. Login in order to verify if everything is ok.

How to execute, enable, disable, and hide a button using the VBScript Workflow
The Actions command can be used to execute, enable, disable, and hide a button. The
following example demonstrates how to disable and hide the R&D Comments button as well
as the corresponding R&D Comment view upon entering the Defect module.

Usage:

Execute

Actions.Action("BugAddDevCommentsAction1").Execute

Enable

Actions.Action("BugAddDevCommentsAction1").Enabled = true

Note:

If there is a corresponding menu option, you should check it also:

Actions.Action("_dxact_main_menu_menu_rdcomments").Checked = true

Disable

Actions.Action("BugAddDevCommentsAction1").Enabled = false

Note:

If there is a corresponding menu option, you should uncheck it also:

Actions.Action("_dxact_main_menu_menu_rdcomments").Checked = false

Hide

Actions.Action("BugAddDevCommentsAction1").Visible = false

Example:

Sub Defects_EnterModule

On Error Resume Next

Actions.Action("BugAddDevCommentsAction1").Enabled = false

Actions.Action("BugAddDevCommentsAction1").Visible = false
Actions.Action("_dxact_main_menu_menu_rdcomments").Visible = false

On Error GoTo 0

End Sub

Manually uninstall Quality Center/Application Lifecycle Management client files

For Windows XP client:

1. Clear Common Files


1.1. Open the folders:
1.1.1. c:\Program Files\Common files
1.1.2. %USERPROFILE%\Local Settings\Application Data\HP
1.1.3. C:\Documents and Settings\All Users\Application Data\HP
1.2. Delete all folders that might have to do with Quality Center\ALM Platform:
1.2.1. Mercury
1.2.2. Mercury Interactive
1.2.3. HP- only if Quality Center folder is under it
1.2.4. ALM-Platform
1.2.5. ALM-Client
2. Clear Temporary folder
2.1. Open the command line
2.2. Write %temp% and click Enter
2.3. Delete all folders that have might to do with Quality Center
2.3.1. Quality Center
2.3.2. Mercury
2.3.3. Mercury Interactive

2.3.4. TD_80
3. Clear Registry- Only on a client machine- not on a server!
3.1. Open the command line
3.2. Write regedit and click Enter
3.3. Navigate to: My Computer\HKEY_LOCAL_MACHINE\Software
3.4. Delete all folder that have to do with Quality Center:
3.4.1. Mercury
3.4.2. Mercury Interactive
4. Clear Loader Class
4.1. Open Explorer
4.2. In the toolbar select Tools -> Internet Options
4.3. In the window that opened navigate to tab General
4.4. Under the section Browsing Settings click the History Button
4.5. In the window that opened click on the button View Objects
4.6. In the window that opened delete all files that:
4.6.1. begin with Loader Class
4.6.2. begin with Spider91
4.6.3. begin with ALM

5. Clear Temporary Internet Files


5.1. Open Internet Explorer
5.2. In the toolbar select Tools -> Internet Options
5.3. In the window that opened navigate to General tab
5.4. Under the section Browsing Settings click the History Button
5.5. In the window that opened click on the button View Files button
5.6. Delete all Temporally Internet Files

For Vista or Windows 7 clients:

1. Clear Common Files

1.1. Open the folders:


1.1.1. c:\Program Files\Common files
1.1.2. %LOCALAPPDATA%\HP
1.1.3. %ALLUSERSPROFILE%\HP
1.2. Delete all folders that might have to do with Quality Center\ALM Platform:
1.2.1. Mercury
1.2.2. Mercury Interactive
1.2.3. HP- only if Quality Center folder is under it
1.2.4. ALM-Platform
1.2.5. ALM-Client
2. Clear Temporary folder
2.1. Open the command line
2.2. Write %temp% and click Enter
2.3. Delete all folder that have might to do with Quality Center
2.3.1. Quality Center
2.3.2. Mercury
2.3.3. Mercury Interactive

2.3.4. TD_80
2.4. Delete the following files:
2.4.1. interop.ALPLoader.dll
2.4.1. interop.ALM-Platform-Loader.11.cab
2.4.3. interop.ALM-Platform-Loader.11.ocx
3. Clear Registry- Only on a client machine- not on a server!
3.1. Open the command line
3.2. Write regedit and click Enter
3.3. Navigate to: My Computer\HKEY_LOCAL_MACHINE\Software
3.4. Delete all folder that have to do with Quality Center:
3.4.1. Mercury
3.4.2. Mercury Interactive
4. Clear Loader Class
4.1. Open Explorer
4.2. In the toolbar select Tools -> Internet Options
4.3. In the window that opened navigate to tab General
4.4. Under the section Browsing Settings click the History Button
4.5. In the window that opened click on the button View Objects
4.6. In the window that opened delete all files that:
4.6.1. begin with Loader Class
4.6.2. begin with Spider91
4.6.3. begin with ALM
5. Clear Temporary Internet Files
5.1. Open Internet Explorer
5.2. In the toolbar select Tools -> Internet Options
5.3. In the window that opened navigate to General tab
5.4. Under the section Browsing Settings click the History Button
5.5. In the window that opened click on the button View Files button
5.6. Delete all Temporally Internet Files

How to change the JBoss heap memory

After the installation of JBoss , it is sometimes necessary to change the heap memory used
by JBoss. This is usually done when there is an increase in the number of active projects in
Quality Center or an increase in the number of concurrent user sessions.

Increasing the heap size (virtual memory) for JBoss

For Windows, you can increase the heap size by uninstalling/reinstalling the Quality Center
Service and modifying the InstallJbossService.bat file. For Linux/Unix, you need to modify
the run.sh file. The user who re-installs the JBOSS service should be the same user that is
running the JBOSS service. Usually that is the Local System Account.

Recommended heap sizes, depending on the number of concurrent user sessions:

Small: 128 – 256MB ~ Up to 10 concurrent user sessions

Medium: 256 – 512MB ~ Up to 100 concurrent user sessions

Very Large: 1024 – 2048MB ~ Up to 350 concurrent user sessions

Notes:

Neither value can be more than your max RAM size

Neither value can be more than supported by your Operating System

Uninstall/Reinstall QC Service for Windows:

Note: Verify that users are not working on Quality Center and Quality Center Service is
stopped.

1. Open Command Prompt and navigate to "<Drive Letter:>\program files\HP\Quality


Center\jboss\bin" folder.

Note: For TestDirector for Quality Center 9.0 the path is "<Drive Letter:>\program
files\Mercury\Quality Center\jboss\bin"
2. Execute the following command (this will uninstall the existing service):

InstallJbossService.bat -uninstall

3.Edit the InstallJbossService.bat file.

Example:

If the heap memory is currently:

set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m

increase the heap size as follows:

set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m

4. Save and close the InstallJbossService.bat.

5. Execute the following command (this will install the service with the modified heap size
parameter):

InstallJbossService.bat -c default (-help shows options)

6. Verify that the service has been installed, Control Panel -> Administrative Tools ->
Services.

7. Start the HP Quality Center Service.

8. Check that the Quality Center Debug Console shows heap size that was specified as
available memory:

http://hostname:8080/qcbin/servlet/tdservlet?method=debuginfo

http://hostname:8080/sabin/servlet/tdsiteadminservlet?method=debuginfo

Notes:

If you are using a cluster environment, the hostname should be the cluster machine name,
and you will need to apply the above steps to each cluster.

Also edit the run.bat file to ensure it is synchronized with the way the QC service runs.

Modify the run.bat file:


1. On the application server, locate the JBoss bin folder under your TD for QC installation. By
default, the location is <System Drive:>\Program Files\HP\Quality Center\JBoss\bin.

Note: For TestDirector for Quality Center 9.0 the path is <System Drive:>\Program
Files\Mercury\Quality Center\JBoss\bin.

2. Edit the run.bat file (or run.sh for Linux/Unix).

Example:

If the heap memory is currently:

set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m

increase the heap size as follows:

set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m

3. Save and close the run.bat.

4. Execute the run.sh file only for Linux/Unix.

You might also like