This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

<QC/ALM Support Tip> "Failed to get test value" error in Test Plan module

Dear Customers,

 

Sometimes due to a project corruption, when the users try to open a particular test folder in Test Plan module in ALM11.x, the following error message is displayed:

image text

In the Quality Center (QC) log file the error message that appears is:

Messages:
Failed to Get Test Value;Unexpected failure in getValuePostProcess of com.mercury.td.tdserver.api.logics.TestGetValuePlugin;Failed to calculate test change detectability;Failed to get entity data.;
Stack Trace:
com.mercury.optane.core.CTdException: Failed to get entity data.

 

The issue is usually caused by the fact that there are component instances that belong to tests but point to a non-existing components. These non-existing components may be either manually deleted directly from the DB backend or may be present due a DB corruption. In order to fix the issue the following SQL queries should be executed:

1. First verify the issue is caused by non-existing components by running below query:

 

select t2.BC_CO_ID from
(
select distinct t1.TS_TEST_ID, t1.BC_CO_ID, c.CO_ID from
(select t.TS_TEST_ID, BC_CO_ID
from TEST t
inner join BPTEST_TO_COMPONENTS btc on t.TS_TEST_ID = btc.BC_BPT_ID)t1
left join COMPONENT c on t1.BC_CO_ID = c.CO_ID where c.CO_ID is null and BC_CO_ID > 0)t2


2. If the above query returns one or more results then execute the following: 

 

          update BPTEST_TO_COMPONENTS set BC_CO_ID = 0 where BC_CO_ID in
(select t2.BC_CO_ID from
(select distinct t1.TS_TEST_ID, t1.BC_CO_ID, c.CO_ID from
(select t.TS_TEST_ID, BC_CO_ID
from TEST t
inner join BPTEST_TO_COMPONENTS btc on t.TS_TEST_ID = btc.BC_BPT_ID)t1
left join COMPONENT c on t1.BC_CO_ID = c.CO_ID where c.CO_ID is null and BC_CO_ID > 0)t2)

 

Please note that it is highly recommended to make a backup of the affected project before applying the above steps. It is also recommended to involve your DBA for assistance.  Hope this information helps! If the issue continues to persist, please contact HP Software Support!

 

Kind regards,

Hristo

Tags: