2

I'm able to query a HPQC database to retrieve execution information from the TEST and STEP tables.

I'm also able to query for defect information from the BUG tab.

But, I'm struggling to find a way to fetch the list of defects that have been associated with a failing step/test - could someone provide me a query that can join tests to bugs, or point me to the table that contains this information?

This is on an old HPQC 9.2 instance.

2 Answers 2

3

Turns out this was easily done using the LINKS table - here's an example of query to retrieve all the RUNS a bug is associated with:

SELECT DISTINCT LN_BUG_ID as BugId, LN_ENTITY_ID AS EntityId
FROM td.LINK
WHERE LN_ENTITY_TYPE = 'RUN'
UNION
SELECT LN_BUG_ID, ST_RUN_ID
FROM td.LINK
INNER JOIN td.STEP
ON LINK.LN_ENTITY_ID = STEP.ST_ID
WHERE LN_ENTITY_TYPE = 'STEP'
UNION
SELECT LN_BUG_ID, RN_RUN_ID
FROM td.LINK
INNER JOIN td.RUN
ON LINK.LN_ENTITY_ID = RUN.RN_TESTCYCL_ID
WHERE LN_ENTITY_TYPE = 'TESTCYCL'
0

Below link has the query and information to link the test lab and defects. how-to-retrieve-requirement-test-case

1
  • Welcome to SQA, Sham. On stackexchange links are usually not enough. It would help others if you summarize the content of the link.
    – dzieciou
    Commented Dec 4, 2012 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.