脚本如下:
---------------------------------------
Dim qtApp
Dim qtTest
Dim qtResultsOpt
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True
qtApp.Open "C:\QuickTest Professional\tests\test1\test1.usr", True
Set qtTest = qtApp.Test
qtTest.Settings.Run.OnError = "NextStep"
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation = "C:\QuickTest Professional\tests\test1\"
qtTest.Run
Set qtResultsOpt = Nothing
Set qtTest = Nothing
Set qtApp = Nothing
---------------------------------------
文章来源于领测软件测试网 https://www.ltesting.net/