| || |
How to find the al_item_id of leaf nodes
How to find the al_item_id of leaf nodes of a given top level node.
Here i have the folder name(top level folder F1)
want to find the al_item id s of the leaf nodes i.e f4 ,f5
the tree structure is not fixed there could more complicated branching...in short i want to get the item ids of the leaf level nodes....
the leaf level nodes contain manual tests
and the count of manual tests could be found as
select count(*) from td.test where ts_subject='xxxx'
where in xxxx=item id fo child node
thus we could find out the number of manual tests under a given top level folder.
Appreciate your help!!!
Re: How to find the al_item_id of leaf nodes
My team uses a complex folder structure to organize tests. It gave us some benefits but complicated the reporting part. To get the number of passed/failed/manual/automated/all tests under the top level (or second/third/etc level) folders we use the Test Plan Execution Status report from here http://www.rbreporting.com/hp_qualit...k.htm#TestPlan (this report is actually free).
Alternatively you may use this SQL query to find how many manual tests each top folder contains. We use this query as a template if we need to get something very special from the folder structure:
with folders (folder_id, parent_folder_id, top_folder) as(
select al_item_id as folder_id, al_father_id as parent_folder_id, al_description as top_folder
where al_father_id=(select al_item_id from td.all_lists where al_description='Subject')
select al_item_id, al_father_id, top_folder
from td.all_lists join folders on al_father_id=folder_id
select top_folder, SUM(test_count) as test_count from (
select folder_id, parent_folder_id, top_folder, count(ts_test_id) test_count
from folders left join td.test on folder_id = ts_subject
group by folder_id, parent_folder_id, top_folder
) s group by top_folder