Dim qtApp
Dim qtTest
Dim qtResultsOpt
Set qtApp=CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible=True
qtApp.Options.Run.ImageCaptureForTestResults="ONError"
qtApp.Options.Run.RunMode="Fast"
qtApp.Open "C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\Test1",True
Set qtTest=qtApp.Test
qtTest.Settings.Run.OnError="NextStep"
Set qtResultsOpt=CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation="C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\Test1\Res1"
qtTest.Run
'qtTest.Close
Set qtResultsOpt=Nothing
Set qtTest=Nothing
Set qtApp=Nothing
上面的代码,执行后我有几个疑惑,请大家指点下小弟。
1:qtResultsOpt.ResultsLocation="C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\Test1\Res1"
执行结果不会保存在以上目录。
2:
Set qtResultsOpt=Nothing
Set qtTest=Nothing
Set qtApp=Nothing
以上代码的作用是什么?
3:若我想添加保存QTP当前配置,再执行上述对配置的修改,最后还原QTP配置的代码该如何写呢?