11-03-2012, 12:23 AM
I have a VariableList.vbs file that I load using File->Settings->Resources and adding as my last Associated Function. Within my VariableList.vbs file I have about 30 or so variables that I set to 0 or null for the current environment.
I also use the statement DataTable.Importsheet"J:\QTP_Tests\NightlyRegressionTesting\GlobalDatatableForStartPerENV.xls", 1, "Global" which for each iteration (dev, ite, cte, prod) will set the user Id, password and a few other variables for each iteration.
The problem is that as I run my tests for each iteration, the 30 or so variables are not getting reset back to 0 or null as I need them to.
How do I change my code to reset my VariableList.vbs?
Do I pull DataTable.Importsheet"J:\QTP_Tests\NightlyRegressionTesting\GlobalDatatableForStartPerENV.xls", 1, "Global" out of my VariableList.vbs and stick the code on my test?
or
Do I remove my VariableList.vbs as an associated function? And call it separately within my test.
Or
How can I set my global datasheet to run through each iteration/environment, then reset /recall the VariableList.vbs for each iteration?
Any thoughts?
I also use the statement DataTable.Importsheet"J:\QTP_Tests\NightlyRegressionTesting\GlobalDatatableForStartPerENV.xls", 1, "Global" which for each iteration (dev, ite, cte, prod) will set the user Id, password and a few other variables for each iteration.
The problem is that as I run my tests for each iteration, the 30 or so variables are not getting reset back to 0 or null as I need them to.
How do I change my code to reset my VariableList.vbs?
Do I pull DataTable.Importsheet"J:\QTP_Tests\NightlyRegressionTesting\GlobalDatatableForStartPerENV.xls", 1, "Global" out of my VariableList.vbs and stick the code on my test?
or
Do I remove my VariableList.vbs as an associated function? And call it separately within my test.
Or
How can I set my global datasheet to run through each iteration/environment, then reset /recall the VariableList.vbs for each iteration?
Any thoughts?