Page 1 of 1

database model and how do i get the amount of testcases

PostPosted: Fri Jun 10, 2011 8:28 am
by JayDee
Hi,

we use TL 1.8.5 and want to analyze some things. Does anyone have a real database model?

At the moment we get all informations we want to have besides a counter for our testcases per project (so we wanne know how many testcases we have in each project).

The only way i found so far is like "testprojects" -> "testplans" -> "testplan_tcversions" -> "tcversions" ... so i can get all testcases within a testplan but i don't get testcases which are not part of a testplan... Well i get them from "tcversions" but without any assumption to which project they belong.

Any ideas?

Best Regards, JayDee

Re: database model and how do i get the amount of testcases

PostPosted: Fri Jun 10, 2011 3:33 pm
by fman
there is no a simple query to do this because test spec structure is a tree

testproject -> testsuite -> testsuite -> test case
-> testsuite -> test case

best thing you can do is use method already present on TestLink => testcase.class.php or testproject.class.php