How can we include a file in any WinRunner script, just as we include a header file in C/C++?
We are trying to define some global variables and functions in one file. We want to include this file in each script so that we can write logic based on global variable values and use global functions. I know that we can achieve this (to some extent) by using WinRunner feature of Init script. However there is one limitation - this init script will be common for all the testing projects. Hence I want to avoid init script.
Any clues? Your prompt replies will be highly appreciated.
I actually use a spreadsheet and the ddt_*() functions to set some variables. I don't know if this would be applicable for what you need to do, but here's the basic code I use to do it if you want to give it a try:
The data file (a tab-delimited text file in my case, but you could use a .xls file as well) is formatted with the variable names in row 1 (the WR parameters) and the values to be assigned in row 2 (WR row 1).
"Any sufficiently advanced bug is indistinguishable from a feature." -Bruce Brown
[This message has been edited by Charles Reace (edited 02-04-2003).]