Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > SpiraTeam Issues & Qu... > Test Cases Counts per Por...
Hi,
Is it possible to count the all the created Test Cases per potfolio using ESQL from Edit Reports on SpiraPlan?
Thank you.
Yes, it is possible to count all the created Test Cases per Portfolio in SpiraPlan using ESQL (Enterprise SQL) from the Edit Reports section.
You can write an ESQL query that:
Counts all test cases.
Groups them by Product (aka Project in SpiraPlan).
If your Portfolios are structured using Product Groups (which is SpiraPlan’s way of grouping products into Portfolios), then you can join across tables to get counts per Portfolio.
Hello,
Yes, that can be done for sure.Here is the sample query that counts test cases by portfolio.
SELECT COUNT(TC.[TEST_CASE_ID]) AS TEST_CASE_COUNT, PF.[PORTFOLIO_ID] --,PG.PROJECT_GROUP_ID AS PROGRAM_ID, TC.PROJECT_ID FROM SpiraTestEntities.R_TestCases AS TC INNER JOIN SpiraTestEntities.R_ProjectGroups AS PG ON PG.[PROJECT_GROUP_ID] = TC.PROJECT_GROUP_ID INNER JOIN SpiraTestEntities.R_Portfolios AS PF ON PG.PORTFOLIO_ID = PF.PORTFOLIO_ID GROUP BY PF.[PORTFOLIO_ID] --,TC.[PROJECT_GROUP_ID], --,PG.PROJECT_GROUP_ID --,TC.PROJECT_ID
If you remove the comment symbols for lines 3, 8,9 and 10 then the output will display also an ID or the product and program test cases belong to.Here you can find more details about how to manage portfolios: https://spiradoc.inflectra.com/Spira-Administration-Guide/System-Workspaces/#viewedit-portfolios
Hope that helps.
Regards,Victoria -
And if you have any questions, please email or call us at +1 (202) 558-6885