51Testing软件测试论坛

标题: VBS调用QTP执行脚本问题 [打印本页]

作者: lishazhao    时间: 2012-12-8 16:46
标题: VBS调用QTP执行脚本问题
为什么按照下面的的vbs执行后,一切都正常,但就 "F:\自动化测试结果"这个目录下没有任何测试结果,这是怎么回事呢?

Dim qtApp
Dim qtTest
Dim qtResultsOpt
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True
'Set QuickTest run options
qtApp.Options.Run.ImageCaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Fast"
qtApp.Open "F:\脚本及程序\qtp脚本\ZYZL", True
'set run settings for the test
Set qtTest = qtApp.Test
qtTest.Settings.Run.OnError = "NextStep"
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation = "F:\自动化测试结果"
qtTest.Run
'qtTest.Close ' Close the test
Set qtResultsOpt = Nothing
Set qtTest = Nothing
Set qtApp = Nothing
作者: cellule    时间: 2012-12-10 10:58
qtApp.Open "F:\脚本及程序\qtp脚本\ZYZL", True  这个是不是要添加文件类型的?
作者: joe_deng    时间: 2012-12-10 17:08
建议先启动QTP检查下Results Location选项的按钮是否选择的是New run results folder。如果不是,选择该项再试试




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2