Forum Discussion

jim_marks's avatar
jim_marks
New Contributor
13 years ago

Passing in parameters

There are several bits of information, such as machine names and database names which are necessary to a set of tests I am trying to construct. The test may be run on any one of a number of testing enviornments and these details are not actually things which need testing or confirmation, but they are relevant to file paths and other matters. So, I need to externalize them into parameters which are passed into the test set when it is run.



I've seen the tutorials which show how to make a data loop around a keyword test, and I know you can have a step in a keyword test which simply calls a script, but I can't seem to get all the parts to line up.



Essentially



external file with parameters -> keyword test -. script function receiving parameters.



Have I radically overcomplicated the whole thing or is there a way to get this to work?
  • vajindarladdad's avatar
    vajindarladdad
    Frequent Contributor
    Hi Jim,



    First of all thanks to Tanya for her answer.



    Just to add further , if you are running multiple projects withing single ProjectSuit , it is better to maintain "ProjectSuit" variables.



    One more thing , if you want operating system related information , you can use "Sys" object for the same.

    Here are the properties / methods you can use to fetch the particular information.

    1) Sys.HostName :The name of the current computer.

    2) Sys.OSInfo : Returns the information on the currently installed operating system as OSInfo object.

    3) Sys.UserName : The name of the user under whose account you are currently working.



    For database Name : you have use data loop or create a ProjectSuit / project variable and define value for it.



    I hope this has been of some help.

  • jim_marks's avatar
    jim_marks
    New Contributor
    Sorry for the late response, I was over seas for the holidays.



    Thank you for all the information everyone. While not all of it is 100% relevant for this present problem, it will be sooner or later I'm sure.