一、命令行执行loadrunner的脚本
介绍:LoadRunner\bin\Wlrun.exe -Run -TestPath scenario.lrs -ResultName res_folder
参数说明:
注意上面的关系,结果的完整路径ResultName (full path) = ResultLocation (directory) + ResultCleanName (name)
实例
set LR_HOME=C:\Program Files\Mercury\LoadRunner for /L %%i in (1,1,10) do "%LR_HOME%\bin\Wlrun.exe" -Run -TestPath "%LR_HOME%\scenario\memory_leak_crash.lrs" -ResultName C:\Temp\LR_Res\result%%i |
二、命令行分析并生成结果报告
介绍:LoadRunner\bin\AnalysisUI.exe -RESULTPATH D:\test\testResult\result03\result03.lrr -TEMPLATENAME html
参数说明:
怎么创建报告格式
首先按照需要的图表生成一个报告,然后Tools>Templates>new可以新增模板,但是要注意:
取消勾选Automatically apply this template to a new session
勾选Generate the following automatic HTML report
勾选Automatically save the session as
勾选Automatically close Analysis after saving session
三、实际范例
D:\Program Files (x86)\HP\LoadRunner\bin>wlrun.exe -Run -TestPath D:\loadrunner\Scenarios\test.lrs -ResultName D:\test\testResult\result03 D:\Program Files (x86)\HP\LoadRunner\bin>AnalysisUI.exe -RESULTPATH D:\test\testResult\result03\result03.lrr -TEMPLATENAME html |
可能需要用管理员来执行。
本文内容不用于商业目的,如涉及知识产权问题,请权利人联系51Testing小编(021-64471599-8017),我们将立即处理