[英]Pass Variables to SilkTest Workbench stw.exe from Command Line
無法識別變量
我有一個名為 Dummy 的 Silk Test Workbench.Net 腳本
Public Module Main
Public Test As String = "test"
Public Sub Main()
msgBox(Test)
End Sub
End Module
我想使用命令行運行stw.exe並覆蓋變量Test :
stw.exe -dsn silktest -username user -password password -script Dummy -variable "Test=hello world"
按照使用 stw.exe 的示例中的說明進行操作。
但是 cmd 返回一個錯誤,表示無法識別變量
The following variables were not passed into 'Dummy' as they are not recognized:
->test
我的代碼有什么問題嗎? 或者有什么方法可以通過命令行從 .Net Script 訪問變量?
例如,您需要為Main()
function 使用不同的 function 原型,它將 arguments 作為字典。
Public Module Main
Public Test As String = "test"
Public Sub Main(args as IDictionary(Of String, Object)
Test = args("Test")
msgBox(Test)
End Sub
End Module
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.