Create test items during runtime
Hi,
I am primarily working in Jscript to execute my testcases. I have my testcases defined in an excel sheet and then parse and execute each in a seperate script project Test Item. This means that I have to manually add a Test Item and create a new script routine every time I create a new testcase in the excel sheet. Essentially I have to manually keep them in sync.
I've been looking for a way (but haven't found anything yet) where I can create a new Test Item programmatically for each testcase in my excel sheet. Then I would have just 1 main Test Item that generates new Test Items on runtime so I don't have to do it manually. In pseudo-code it would look something like:
Get all testcases from excel sheet Create a new Test Item for each testcase Run each Test Item
Log result for each Test Item back to excel sheet
The main reason I want create new Test Items is so that my event handlers are triggered (the logging happens in OnStopTest handler for each testcase). I can do it within 1 script routine and without creating new Test Items but then my event handlers are not triggered and everything is logged under 1 LogItem.
So is there any way (or alternative) to achieve the above scenario?
Regards,
Kevin