Forum Discussion

sid's avatar
sid
Occasional Contributor
8 years ago

Run TestScript using Excel

I want to execute all testscript from excel i.e. 1 driverscript will call an excel file , excel having 3 columns 'TestScript' <This column having Test Script Name>  and 'Method' <This column having Function Name> and 'Execute' <This column having Yes/No flag> .How to Run 'Yes' marked TestScript.

 

I am able to read excel values also can assign it to variables. Now using which method I can invoke same TestScript to run.

 

 

'USEUNIT Unit1   '# want to read from excel or how to assign unit name at run time?

'USEUNIT Unit2

'USEUNIT Unit3

.....

...

...

'USEUNIT UnitN

 

Sub Main

 

         unitName =  "Unit2"  '# reading from excel

 

         methodName = "Test" '# reading from excel

 

         Execute unitName &"."&methodName

 

End Sub

 

I don't want to declare 'n' times USEUNIT , want to declare it once like unitName and methodName

 

Is there any method ?