windows执行命令来运行loadrunner录制好的脚本(收藏)

SET M_ROOT=D:Mercury InteractiveMercury LoadRunnerin
cd %M_ROOT%
wlrun.exe -TestPath D:ceshi10ScenarioNo1.lrs -port 8080 -Run -DontClose
其中D:Mercury InteractiveMercury LoadRunnerin 是安装目录
D:ceshi10ScenarioNo1.lrs是脚本目录
DontClose 脚本运行完不关闭控制器,
以上是批处理
把批处理加到 windows的任务计划里,设置好运行时间,就可以了
This means the Controller can be started from a DOS batch (.bat) file (preferrably with a short name on a root drive):
REM Start Controller:
SET M_ROOT=C:Program FilesMercury InteractiveLoadRunnerin
cd %M_ROOT%
wlrun.exe -TestPath D:DevDev1.lrs -port 8080 -Run -DontClose
pause Press Ctrl-Z to keep this window or
Including the -Run parameter is the same as manually pressing the "Start Scenario" automatically upon invocation. This is not a good idea because you may have to decide about collating the file from a previous run or want to change the output folder.

在windows中添加计划任务
开始→程序→附件→系统工具→计划任务→打开添加任务计划。进入任务计划向导。 

利用“任务计划”,可以将任何脚本、程序或文档安排在某个最方便的时间运行。“任务计划”在每次启动 Windows XP 的时候启动并在后台运行。

使用“任务计划”可以完成以下任务:

计划让任务在每天、每星期、每月或某些时刻(例如系统启动时)运行。
更改任务的计划。
停止计划的任务。
自定义任务在计划时刻的运行方式。
参考资料:系统帮助




原文地址:https://www.cnblogs.com/zhengah/p/5033753.html