|
dim qtApp
dim qttest
set qtApp = Createobject("QuickTest.Application") '创建 Application 对象
qtApp.launch ' 启动
qtApp.Options.Run.ViewResults = true
qtApp.Visible = True '可见
qtApp.open "E:\Test1",true '用只读的方法打开测试脚本
Set qtTest = qtApp.Test '创建 Test 对象
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' 创建 Run Results Options 对象
qtResultsOpt.ResultsLocation = "E:\Test1\Res1" ' 设置测试结果保存位置
qtTest.run qtResultsOpt ' 执行测试
qtTest.close ' 关闭测试
qtApp.quit '关闭QTP
Set qtTest = Nothing ' 释放 Test 对象
set qtApp =nothing '释放
--------------------------------------------------------------------------------
如果有多个Test,是不是会有多个qtResultsOpt.ResultsLocation ?
如果我不想用QTP自带的Results Report ,想用第三方的,在上段代码怎么调用? |
|