User Jamilyn Page (Jamilyn.Page@campuspipeline.com) posted:
This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii
I have a library of functions which are all called from a single robot
script. What I really need is the ability to call this one script from
each test case with a single parameter passed to tell the script how to
run. The script also takes several parameters related to version/product
control. I have a means of controlling this outside test manager, but
would prefer to use test manager for that as well.
I need a way to either pass parameters from a testcase to a testscript
or get parameters from the testcase from within the script. Can either
of these things be done?
Yep, You can do this easily.
The script that you want others to call needs to be declared as a library function.
You simply need to turn this script like this. You need to have a Main sub which is empty and another sub or function with a declared params.
Let's call this script "callMeHere" BTW it's a .rec file and not an .sbl file.
Function SomeFuctionToCall (param1 as string)
some statements that use param1
Now you need to declare the function in 'somelibrary.sbh' like this:
declare Function SomeFuctionToCall BasicLib "callMeHere" (param1 as string)