Total testcase count in Postman

I have collection which includes folders and sub folders. These folders and subfolders have testcases added under them. Is there any way to get the total testcase count under the collection by writing a pre request script or any other solution? Please let me know

Hey @ramofficial1

You can use console.log(pm.test.index()); in the sandbox to show the number of tests but the usage of this is quite limited.

It’s only going to tell you how many tests there are and nothing able their state (Passed, Failed, Skipped).