Tuesday 11 December 2012

QTP Java Extensibility - Treat particular class as Internal Frame


Problem

Wish to treat particular class to be internal frame

For example, http://dock.javaforge.com/ where wish to treat particular dockable as internal frame

Solution


</code>
public String class_attr return "mdi" 
</code>

This way, QTP treats the docables as internal-frames

Thursday 22 November 2012

Quality Center - Failed to create MS SQL project with error 'User td already exists in database'

Googling doesn't help much, fortunately HP trouble shooting site provides the solution.


Problem


When creating a new SQL Server project, the user receives the error message, "User td already existsin databaseor "User td already exists in current database." When lookinin the Master databaseor Security setting of the SQL Server, the "td" user cannot be seen. The "td" user is created in MS SQL Server the first time a project is created on that database server.


Diagnosis

Diagnosis:There may be a "td" user already in the Model and/or Master databases.

Solution



Manually drop the "td" user from the Model and/or Master databasesManually drop the "td" user from the Model and/or Master databases, and you will be able to successfully create projects without gettinthe "User td already exists in database" error.

1. Use the Enterprise Manager to open the server and go to "Databases".
2. In the Database list, expand the Model database, and highlight "Users."
3. On the right side, you will see a list of users, delete the "td" user.
4. Repeat steps 2 and 3 for Master database.
You should now be able to create a new SQL Server project

Lesson learnt 


Visit HP Support Online -> Troubleshoot when you are having problem with HP products.

Tuesday 28 August 2012

Quality Center - Query on Manual Execution (Daily/Weekly)


PROBLEM:
You wanted to know how many manual test cases has been executed (i.e. daily/monthly) per testers

SOLUTION:
You need 4 tables (CYCL_FOLD, CYCLE , and TESTCYCL, TEST )

Query1: (Daily)

SELECT DATEPART(YY,TESTCYCL.TC_EXEC_DATE) AS 'Year #', DATEPART(WK,TESTCYCL.TC_EXEC_DATE) AS 'Week #',
DATEPART(DD,TESTCYCL.TC_EXEC_DATE) AS 'Day #', COUNT(DATEPART(DD,TESTCYCL.TC_EXEC_DATE)) AS 'Day Count', TEST.TS_EXEC_STATUS AS 'Execution Status'
FROM cycl_fold
LEFT OUTER JOIN CYCLE ON cycl_fold.cf_item_id = CYCLE.cy_folder_id
LEFT OUTER JOIN testcycl ON testcycl.tc_cycle_id = CYCLE.cy_cycle_id
LEFT OUTER JOIN TEST ON TESTCYCL.TC_TEST_ID = TEST.TS_TEST_ID
WHERE TESTCYCL.TC_TEST_ID = TEST.TS_TEST_ID
AND cycl_fold.cf_item_path LIKE
(
    SELECT ''+a.cf_item_path + '%'
    FROM (SELECT cf_item_path
         FROM cycl_fold
         WHERE TESTCYCL.TC_EXEC_DATE >= '2012-01-01 00:00:00'
         AND cf_item_name = 'Manual Regression') a
)
GROUP BY DATEPART(YY,TESTCYCL.TC_EXEC_DATE), DATEPART(WK,TESTCYCL.TC_EXEC_DATE), DATEPART(DD,TESTCYCL.TC_EXEC_DATE), TEST.TS_EXEC_STATUS
ORDER BY 1 DESC, 2 DESC, 3 DESC

Note: cycl_fold.cf_item_path LIKE ... part is to only try to get test cases running for particular testset folder


Query2: (Daily with Tester)

SELECT DATEPART(YY,TESTCYCL.TC_EXEC_DATE) AS 'Year #', DATEPART(WK,TESTCYCL.TC_EXEC_DATE) AS 'Week #',
DATEPART(DD,TESTCYCL.TC_EXEC_DATE) AS 'Day #', COUNT(DATEPART(DD,TESTCYCL.TC_EXEC_DATE)) AS 'Day Count', TEST.TS_EXEC_STATUS AS 'Execution Status', testcycl.TC_ACTUAL_TESTER AS 'Tester'
FROM cycl_fold
LEFT OUTER JOIN CYCLE ON cycl_fold.cf_item_id = CYCLE.cy_folder_id
LEFT OUTER JOIN testcycl ON testcycl.tc_cycle_id = CYCLE.cy_cycle_id
LEFT OUTER JOIN TEST ON TESTCYCL.TC_TEST_ID = TEST.TS_TEST_ID
WHERE TESTCYCL.TC_TEST_ID = TEST.TS_TEST_ID
AND cycl_fold.cf_item_path LIKE
(
    SELECT ''+a.cf_item_path + '%'
    FROM (SELECT cf_item_path
         FROM cycl_fold
         WHERE TESTCYCL.TC_EXEC_DATE >= '2012-01-01 00:00:00'
         AND cf_item_name = 'Manual Regression') a
)
GROUP BY DATEPART(YY,TESTCYCL.TC_EXEC_DATE), DATEPART(WK,TESTCYCL.TC_EXEC_DATE), DATEPART(DD,TESTCYCL.TC_EXEC_DATE), TEST.TS_EXEC_STATUS, testcycl.TC_ACTUAL_TESTER
ORDER BY 1 DESC, 2 DESC, 3 DESC


Query3: (Weekly)

SELECT DATEPART(YY,TESTCYCL.TC_EXEC_DATE) AS 'Year #', DATEPART(WK,TESTCYCL.TC_EXEC_DATE) AS 'Week #', COUNT(DATEPART(WK,TESTCYCL.TC_EXEC_DATE)) AS 'Week Count', TEST.TS_EXEC_STATUS AS 'Execution Status'
FROM cycl_fold
LEFT OUTER JOIN CYCLE ON cycl_fold.cf_item_id = CYCLE.cy_folder_id
LEFT OUTER JOIN testcycl ON testcycl.tc_cycle_id = CYCLE.cy_cycle_id
LEFT OUTER JOIN TEST ON TESTCYCL.TC_TEST_ID = TEST.TS_TEST_ID
WHERE TESTCYCL.TC_TEST_ID = TEST.TS_TEST_ID
AND cycl_fold.cf_item_path LIKE
(
    SELECT ''+a.cf_item_path + '%'
    FROM (SELECT cf_item_path
         FROM cycl_fold
         WHERE TESTCYCL.TC_EXEC_DATE >= '2012-01-01 00:00:00'
         AND cf_item_name = 'Manual Regression') a
)
GROUP BY DATEPART(YY,TESTCYCL.TC_EXEC_DATE), DATEPART(WK,TESTCYCL.TC_EXEC_DATE), TEST.TS_EXEC_STATUS
ORDER BY 1 DESC, 2 DESC








Wednesday 8 August 2012

Solution to 'The QuickTest Java Add-in Extensibility SKD is not supported for 64-bits operating systems

Problem:
As the title clearly mentioned, was hit into trouble when trying to install QuickTest Professional Java Add-in Extensibility SDK in 64 bits machines. Nevermind, here is the solution

Solution:
To make things easy, lets separate the solutions into 2 sections

Preparation:
Unzip skd.zip

Section 1: Install QTP Java Add-in extensibility plugin into Eclipse
  • Assume Eclipse is installed in drive D (fullpath :- D:/eclipse)
  • Create a new folder to store the QTP related add-in (D:/eclipse-thirdparty)
  • In eclipse-thirdparty directory, create a new folder called eclipse (D:/eclipse-thirdparty/eclipse)
  • Copy the features and plugins from sdk folder into D:/eclipse-thirdparty/eclipse
  • Create a new folder called links in Eclipse (fullpath :- D:/eclipse/links
  • In links directory, create a file with link extension (any name will do). For example, quicktest.link with content 'path=D:/eclipse/thirdparty. Refer to more detail on how to deal with plugin Install eclipse plugins the easy way


Section 2: QuickTest Profession (How to manually install add-in in 64 bits operating system)
  • Make sure QuickTest Professional is install in C:\Program Files (x86)\HP\QuickTest Professional
  • Access to C:\Program Files (x86)\HP\QuickTest Professional\bin\java
  • Copy sdk folder into C:\Program Files (x86)\HP\QuickTest Professional\bin\java 
  • Access to C:\Program Files (x86)\HP\QuickTest Professional\bin\java\sdk\eclipse
  • Double click on deploysdkplugins, then point to D:/eclipse and click OK
Happy testing!

Wednesday 11 January 2012

Quality Center - Query the defects linked for a Release folder

PROBLEM:
You wanted to know all the defects logged for particular Release (Release Folder).
Then you wanted to know the defect count that has (at least) linked to one or more testing items.

SOLUTION:
You need 3 tables (Release, Bug, and Release_Folders)

Query:
SELECT COUNT(BG.BG_BUG_ID)
FROM BUG BG, RELEASE_FOLDERS RF, RELEASES R
WHERE RF.RF_NAME = '5.0.0.0'
AND R.REL_PARENT_ID = RF.RF_ID
AND BG.BG_DETECTED_IN_REL = R.REL_ID
AND BG.BG_BUG_ID IN (SELECT LINK.LN_BUG_ID FROM LINK)

Quality Center - Delete all alerts (2 Levels) belong to the a root requirement

Problem:
There is no direct way to clear alerts belongs to others. However, it can be achieved by performed a DELETE query from Administration.
 
Solution:
Below are the query that will clear all alerts from to a root requirement. It will delete all the alerts 2 level descendent from the root.
 
Query:
DELETE FROM ALERT 
WHERE AT_ENTITY_TYPE = 'REQ'
AND AT_KEY1 IN (
SELECT RQ_REQ_ID FROM REQ where 
RQ_FATHER_ID IN (SELECT RQ_REQ_ID FROM REQ WHERE RQ_FATHER_ID = (SELECT RQ_REQ_ID FROM REQ WHERE RQ_REQ_NAME = 'Async SOAP'))
OR 
RQ_FATHER_ID IN (SELECT RQ_REQ_ID FROM REQ WHERE RQ_REQ_NAME = 'Async SOAP')
OR
RQ_REQ_NAME = 'Async SOAP'
)