Created On:  24 June 2011


How can I pass parameters from SilkCentral Test Manager to SilkTest Workbench tests?


To pass parameters from SilkCentral Test Manager to a Visual Test do the following.
1) In SilkCentral Test Manager, create a new Child Test of type SilkTest Workbench Test. You will need to set up a SilkTest Workbench source control profile before doing this if not already done.
2) Create the parameter, in this example called ‘param1’, on the parameter tab by clicking Add Custom Parameter.  In this example create the parameter as type string with a value of “TOM”.

3) In the visual test in SilkTest Workbench - create a parameter with the same name. In this example we have a simple message box displaying a piece of text.  Add in the step to show the message box at the required point in your script.

If we ran this test now we would get the following:

In order to pass the parameter to a .Net script we must do the following:
1) Create a .Net script that takes a parameter, something like the below.  It must also have the name ‘param1’

2) Have the Visual test call the .Net script and pass in the parameter.  Do this by right clicking on the Visual Test and selecting Insert
à .Net script.
3) Double-click on the line that calls the .Net Script - the properties window will open - specify that the Visual Test's Parameter "param1" should be passed to the .Net script as the input parameter value, as shown above.

3) Now simply call the visual test from SilkCentral Test Manager as normal and the parameter will in turn be passed to the .Net script.