| || |
Dynamic Test Plan
I'm new to Silk Test and I've inherited someone else's script which contains a
Main () function and required testcases. The Main loops until EOF (the external file is a csv) and depending on the test records within the csv, calls one of 4 testcases, each based on a different line of business. There exists a test plan but the limitations are that the testcases can only be run one at a time, with related records in the csv file to that particular testcase. My question is:
Is there a way to get Silk to include the Main function in the test plan and then dynamically call (in a loop) a testcase as it relates to the record in the csv file? I'm interested in doing this so as to take advantage of some of the reports that can only be gained from the results of running the test plan.
I already know this doesn't work, but the only solution that has been recommended to me is either writing a loop for each individual testcase or creating 4 separate csv files for each testcase. However, this wouldn't accurately simulate input from a user. It is more likely that input would be a randomization of each testcase and that's how the current csv file is set up.
First I want the plan to loop.
Second, based on the record in the csv, I want the loop to call the appropriate testcase.
Third, I want to be able to get a breakdown on the cases that were run, success/failure of the testcases and possibly a chart to show the business analyst in charge of the project.
Any ideas? :confused
Thanks in advance,
Re: Dynamic Test Plan
One thing to note about test plans is that you can call any SilkTest function using the "Testcase:" keyword, not just the testcase functions. So the following is completely valid in a plan:
Call the Main function in MyTest.T
And then Main() function can call the testcase Functions.
The only problem with this method is that the testplan results file will consider this to be only 1 test.