| || |
How to make Main() report total number of testcases
In a .t file I am using Main() to loop through a date table on which each row is a testcase. The code looks like:
for each row on the data table
call a testcase
When I use Run > Run from the .t file, the total number of testcases is reported correctly in the summary. But if I call main from the .pln file, the summary always says 1 testcase ran. I wonder how I can fix the problem? Thanks in advance.
Re: How to make Main() report total number of testcases
If you know how many rows there are in the data table, you can create a separate entry in your testplan for each row, and use the testdata: statement to pass the row identifier to a fucntion which can retrieve the data from the data table and call the testcase.
If you don't know how many, I'm not sure you can get the info you want from a plan.
You can also define TestCaseExit (BOOLEAN bExcept) in your frame and write each of your testcase results to your own list, database, or other result format.