如何通过计划任务调用QuickTest测试脚本
程序员文章站
2022-06-23 21:10:01
我们可以编写一个vbs脚本,直接在windows平台下直接运行调用qtp的测试脚本,也可以将这个脚本添加到计划任务中,可以定时执行。 脚本如下: -------------...
我们可以编写一个vbs脚本,直接在windows平台下直接运行调用qtp的测试脚本,也可以将这个脚本添加到计划任务中,可以定时执行。
脚本如下:
---------------------------------------
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
脚本如下:
---------------------------------------
复制代码 代码如下:
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
上一篇: 校园导航
下一篇: 微信视频号怎么禁止音乐视频引用?