Hi guys!
Anyone out there know how to write an SQL query for the back-end database for Quality Center where you can get:
1. All defects related to a single Test Run
2. All the Test Runs related to a Defect
Cheers guys, any help is much appreciated.
Hi guys!
Anyone out there know how to write an SQL query for the back-end database for Quality Center where you can get:
1. All defects related to a single Test Run
2. All the Test Runs related to a Defect
Cheers guys, any help is much appreciated.
Whether you need the query or the place where to write a query?
Query for listing all the defects from a run/cycle.
SELECT * FROM BUG Where BG_CYCLE_ID = 'specify the cycle id.
(OR)
SELECT * FROM BUG Where BUG.BG_DETECTION_DATE = ' Specify the date in which the test is runned.
Create a new Excel Report and place the SQL query in the Excel Report Generator.
You can go the Excel Generator thro' In the QC goto Tools -> Excel Reports.
There you can find many tables listed in the right pane, from there select the table BUG where you can find the columns in that table, add the required column names in the above select query as per ur requirement.
Like that the above procedure you can write the query for ur second requirement. by
Select * from BUG where BUG.BUG_ID = ' Specify the Defect Id for which u need the details of the test run.
Kindly let me know if you have any queries.
Thanks
I just need the actual SQL as I can do the exporting via a tool that's been created into a report format.
However there's a bit of an issue As a defect may have been linked to multiple Test I need to find out which Tests a defect has been linked to:
For Example:
Defects and all their associated links in the form of tests.
Defect 1 - Test 1
- Test 2
And then I require a query that can do:
Test 1 - All associated defects i.e.
- Defect 1
- Defect 2
The other slight problem is that BG_CYCLE_ID isn't being populated in the schema I'm using - is there a way round that?
Any help would be much appreciated.
I use something similar to the following SQL:
This on returns bugs and tests based on all links to that test and uses the Test in Test Plan.
Code:
SELECT DISTINCT BUG.BG_BUG_ID, TEST.TS_NAME
FROM V_LINK_TEST INNER JOIN
BUG ON V_LINK_TEST.LN_BUG_ID = BUG.BG_BUG_ID INNER JOIN
TEST ON V_LINK_TEST.LN_TEST_ID = TEST.TS_TEST_ID
ORDER BY BUG.BG_BUG_ID
This one is the same except looks at links to a test in a test set (TESTCYCL).
Code:
SELECT DISTINCT BUG.BG_BUG_ID, TEST.TS_NAME AS Expr1
FROM V_LINK_TESTCYCL INNER JOIN
BUG ON V_LINK_TESTCYCL.LN_BUG_ID = BUG.BG_BUG_ID INNER JOIN
TESTCYCL ON V_LINK_TESTCYCL.LN_TESTCYCL_ID = TESTCYCL.TC_TESTCYCL_ID INNER JOIN
TEST ON TESTCYCL.TC_TEST_ID = TEST.TS_TEST_ID
ORDER BY BUG.BG_BUG_ID
You must log in to post.
Video embedded using Easy Video Embed plugin