how 2 get the count of total no of test cases each category?

The release 1.6 is going to be unsupported by Community. Because our effort moves ahead. However there are still valuable informations for you.
Locked
vayal
TestLink user
Posts: 12
Joined: Fri Feb 09, 2007 7:26 am

how 2 get the count of total no of test cases each category?

Post by vayal »

I have written a query like this to generate a report
*****************************
SELECT co.name as Component,ca.name as Category, p.name as Product FROM mgtcomponent co,mgtcategory ca, mgtproduct p where co.id=ca.compid and co.prodid=p.id;
******************************
In this report i have to show the number of test cases under each category(in the test link tree menu if we add testcases under category, count is displayed). Can anyone please tell me how to write a MySql query for that? or how in that testlink tree they are getting the count?

Thanks and Regards
Vayal
vayal
TestLink user
Posts: 12
Joined: Fri Feb 09, 2007 7:26 am

how 2 get the count of no of test cases under each category?

Post by vayal »

vayal wrote:I have written a query like this to generate a report
*****************************
SELECT co.name as Component,ca.name as Category, p.name as Product FROM mgtcomponent co,mgtcategory ca, mgtproduct p where co.id=ca.compid and co.prodid=p.id;
******************************
In this report i have to show the number of test cases under each category(in the test link tree menu if we add testcases under category, count is displayed). Can anyone please tell me how to write a MySql query for that? or how in that testlink tree they are getting the count?

Thanks and Regards
Vayal
havlatm
Member of TestLink Community
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Post by havlatm »

I guess something like:

select count(mgttestcase.id) from mgttestcases, mgtcategory where mgtcategory.id=mgttestcases.catid and mgtcategory=<your name>

I wrote it without look to db, so modify tables and fields names for correct ones.
Locked