如何通过计划任务调用QuickTest测试脚本
我们可以编写一个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
相关推荐
TuxedoLinux 2020-09-11
maxelliot 2020-06-28
chichichi0 2020-06-10
today0 2020-06-08
higheels 2020-06-03
ITstudied 2020-05-12
xiechao000 2020-05-03
测试自动化顾问 2020-05-01
goodby 2020-04-30
today0 2020-04-22
jszy 2020-04-20
lucialee 2020-02-23
luanyu 2020-02-18
goodby 2020-01-05
mohanzb 2019-12-21
jszy 2019-12-14