Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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?

share|improve this question
    
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 Dec 6 '13 at 13:26
    
I get test cases who don't have solved bugs. –  Oliver Dec 6 '13 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 Jan 31 at 0:53
add comment

1 Answer 1

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')
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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