1

I am looking for all test cases in the TestLab which have solved defects and don't have the run status 'passed'. To do this, I used the dashboard and build the following report:

SELECT BG_BUG_ID,
BG_STATUS,
BG_PRIORITY,
BG_RESPONSIBLE,
LINK.LN_LINK_ID,
LINK.LN_BUG_ID,
LINK.LN_ENTITY_TYPE,
LINK.LN_ENTITY_ID,
LN_TESTCYCL_ID,
TC_CYCLE_ID,
TC_TEST_ORDER,
TC_STATUS,
TS_NAME,
TS_STATUS,
TS_EXEC_STATUS
from (BUG LEFT JOIN LINK ON BG_BUG_ID = LN_BUG_ID )
LEFT JOIN V_LINK_TESTCYCL on LINK.LN_BUG_ID = V_LINK_TESTCYCL.LN_BUG_ID
LEFT JOIN CYCLE ON LINK.LN_ENTITY_ID = CY_CYCLE_ID
LEFT JOIN TESTCYCL on V_LINK_TESTCYCL.LN_TESTCYCL_ID = TC_TESTCYCL_ID
left join test on tc_test_id = ts_test_id

Where

BG_STATUS IN ('100 - closed')
and  BUG.BG_RESPONSIBLE = 'myName' /*Defect.Assigned  to*/
and  TS_EXEC_STATUS IN ('Passed', 'No Run')
ORDER BY BG_BUG_ID

But it does not work. Can anyone help?

3
  • What do you mean with "it does not work" ? Do you get an error message, or the outcome does not contain waht you expect ?
    – philant
    Commented Dec 6, 2013 at 13:26
  • I get test cases who don't have solved bugs.
    – Oliver
    Commented Dec 6, 2013 at 14:04
  • @Oliver. You can link a BUG at many different levels in QC. That is you can link it to a Test Set, Test Instance, Run, or Step. Does you organization link consistently at a particular level or could the link be anywhere? This will dramatically affect the complexity of the query. Were you aware that QC has an ability to notify a tester when a bug associated to a test goes into a particular state as in Closed, etc. You may not need this query at all.
    – Harrison
    Commented Jan 31, 2014 at 0:53

1 Answer 1

2

Maybe I'm misunderstanding, but is the difference here that the requirement is not passed:

...don't have the run status 'passed'

and the query looks for is passed

TS_EXEC_STATUS IN ('Passed', 'No Run')

If you change that line to omit the 'Passed' string, do you get the desired results?

eg

TS_EXEC_STATUS IN ('No Run')

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.