一、命令行執行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),我們將立即處理