Vbscript 将测试参数从.vbs传递到QTP测试

Vbscript 将测试参数从.vbs传递到QTP测试,vbscript,qtp,hp-uft,Vbscript,Qtp,Hp Uft,如何从启动QTP测试的.vbs文件中获取测试参数?我可以在没有任何输入参数的情况下从.vbs文件运行测试,但是我似乎找不到将参数从文件中获取到测试的方法 以下是我到目前为止的情况: Set qtp = CreateObject("QuickTest.Application") 'Launch QTP qtp.Launch 'Set QTP visible qtp.Visible = True 'Run Mode - Fast qtp.Options.Run.RunMode = "Fast"

如何从启动QTP测试的.vbs文件中获取测试参数?我可以在没有任何输入参数的情况下从.vbs文件运行测试,但是我似乎找不到将参数从文件中获取到测试的方法

以下是我到目前为止的情况:

Set qtp = CreateObject("QuickTest.Application")

'Launch QTP
qtp.Launch

'Set QTP visible
qtp.Visible = True

'Run Mode - Fast
qtp.Options.Run.RunMode = "Fast"

'View Results - True
qtp.Options.Run.ViewResults = True

'Open the test
qtp.open "C:\MY\TEST", True

Set test = qtp.Test

Set params = test.ParameterDefinitions.GetParameters()

parameter1 = "par1"
parameter2 = "par2"

params.Item(par1).Value = "This is my first parameter"
params.Item(par2).Value = "This is my second parameter"

Set qtpResultsLocation = CreateObject("QuickTest.RunResultsOptions")

qtpResultsLocation.ResultsLocation = "C:\SOME\RESULTS\FOLDER"
test.Run qtpResultsLocation

test.Close

Msgbox("Closed test.. closing application")
qtp.quit

我觉得需要进行某种类型的测试。ParameterDefinitions.SetParameters(),但这就是我在网上找到的所有内容。

test.Run qtpResultsLocation
实际上并没有传递参数。我需要编写
test.Run qtpResultsLocation,True,params

感谢您在自己的问题解决后发布答案,而不是不回答。