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.

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

Postby vayal » Wed Feb 21, 2007 2:13 pm

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?

Postby vayal » Wed Feb 21, 2007 2:15 pm

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
vayal
TestLink user
 
Posts: 12
Joined: Fri Feb 09, 2007 7:26 am

Postby havlatm » Thu Feb 22, 2007 5:09 am

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.
havlatm
Member of TestLink Community
 
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech


Return to TestLink 1.6 (closed)



Who is online

Users browsing this forum: No registered users and 2 guests