Friday, April 29, 2016

Someone might have accidentally deleted the Test scripts/ Test Runs/ Defect even then no need to worry since we found a solution to retrieve deleted artifacts in HP ALM/QC


Did you ever got into a situation where you are pressurized to retrieve the deleted artifacts in ALM and when you looked at DB backup those records are there. No need to worry if your backend is oracle.

When we got into this situation below are SQL statements which we have executed to retrieve the deleted test scripts in Test Plan module.
 
Below are Queries which you can execute it to retrieve the deleted test scripts in the test plan module. If you want to test these follow the below steps.

Create a test folder and underneath create test scripts in test plan module. Delete the folder and then execute the following queries by updating the date and time when those test scripts are created.

insert into test
SELECT * FROM TEST as of timestamp to_timestamp('26-03-2016 12:27','DD_MM_YYYY HH24:MI') where ts_test_id not in (select  ts_test_id  from TEST)

insert into TEST_CONFIGS
SELECT * FROM TEST_CONFIGS as of timestamp to_timestamp('26-03-2016 12:27','DD_MM_YYYY HH24:MI') where tsc_test_id not in (select  tsc_test_id  from TEST_configs)


insert into TEST_CRITERIA
SELECT * FROM TEST_CRITERIA as of timestamp to_timestamp('26-03-2016 12:27','DD_MM_YYYY HH24:MI') where tcr_test_id not in (select  tcr_test_id  from TEST_CRITERIA)


 
 

 

No comments:

Post a Comment