ilija_panov
13 years agoContributor
using global variables to pass data between tests
Hi to All,
I have a variable accounts of custom dictionary type in JScript which is filled by an ADO function from a database. So there is no predefined project variable type ( string, table, DBTable, Object) which can server to store this variable and pass it between test script units.
Also have a requirment for recursovely traversing the test scripts with a DDT excel driver so it is important to fill the accounts global variable to be used in thje rest fo the tests in every DDT cycle.
The problem is that for a variable to be global in TC it is neccesary to be defined out of a function. In this case I have no fill this variable since if it's not in a function it cannot be called from Test Items. Would really appreciate some help with global variables
Thanks,
Ilija
I have a variable accounts of custom dictionary type in JScript which is filled by an ADO function from a database. So there is no predefined project variable type ( string, table, DBTable, Object) which can server to store this variable and pass it between test script units.
Also have a requirment for recursovely traversing the test scripts with a DDT excel driver so it is important to fill the accounts global variable to be used in thje rest fo the tests in every DDT cycle.
The problem is that for a variable to be global in TC it is neccesary to be defined out of a function. In this case I have no fill this variable since if it's not in a function it cannot be called from Test Items. Would really appreciate some help with global variables
Thanks,
Ilija