Passing each row values as test variables for various tests from one single Excel sheet
- 10 years ago
If you know the number of tests that will be run, you can accomplish what you want using a combination of a Data Driven Loop and If..Then statements with 1 If..Then statement for each called test. I was able to write a simple KWT doing that. (See below.) If you run a different number of tests at different times, then you can include an If..Then statement as the first statement after the DataDriver Loop that looks to see if the TestNumber in the Excel file is a specific value, say 9999. If it finds that value, the script exits the data loop. So the logic is as follows:
Main Test
- DDT Loop
* If TestNumber = 9999 GoTo 'ExitLoop' Label
* If TestNumber = 1 Run KWT Test1
* If TestNumber = 2 Run KWT Test2
* If TestNumber = 3 Run KWT Test3
* etc.
Label ExitLoop
{end of test}