Variables are not recognized
I hava a Silk Test Workbench .Net Script called Dummy
Public Module Main
Public Test As String = "test"
Public Sub Main()
msgBox(Test)
End Sub
End Module
I want to run stw.exe using Command Line and override the variable Test:
stw.exe -dsn silktest -username user -password password -script Dummy -variable "Test=hello world"
Following the instruction from the example for using stw.exe.
But the cmd return an error that said the variables are not recognized
The following variables were not passed into 'Dummy' as they are not recognized:
->test
Any wrong from my code? Or is there any way to access the variables from .Net Script by command line?
You need to use a different function prototype for the
Main()function that takes the arguments as a dictionary, for example.You also need to add the variable to the script properties, open the script and view the
Propertieswindow for the script.Now right click on the
Inputnode (under theParametersnode) and selectAdd Input Parameter.... A dialog will appear where you can enter the name of the parameter, select the type of the parameter, and provide a default value.