FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Loadrunner helps





amarshinde
How to run LoadRunner Controller from command line?

Today I will explain how to open and run LoadRunner Controller scripts from command line.
This feature can decrease tester's manual efforts and thereby to increase your effectiveness and performance.

You can open LoadRunner Controller scenario with:

LoadRunner\bin\Wlrun.exe -Run -TestPath scenario.lrs -ResultName res_folder



As a result of above command, LoadRunner Controller:

starts
opens Controller scenario
executes it
saves results to folder 'C:\Temp\LR_Res\result_0'
After that, Controller finishes working and closes.
Please, see files from created 'C:\Temp\LR_Res\result_0' folder:
Tips: As you see, there is LoadRunner Result file (result_0.lrr). You can pass it automatically to LoadRunner Analysis for further processing.
Refer for detailed information: Custom HTML report in LoadRunner Analysis from command line.

Actually, Wlrun.exe can have several settings. There are their descriptions from HP LoadRunner Controller User's Guide ( HP/Mercury Interactive):
TestPath Path to the scenario.
For example, C:\LoadRunner\scenario\Scenario.lrs
If the path includes blank spaces, use quotation marks.
Run Runs the scenario, dumps all output messages into res_dir\output.txt and closes Controller
InvokeAnalysis Instructs LoadRunner to invoke Analysis upon scenario termination. If this argument is not specified, LoadRunner uses the scenario default setting.
ResultName Full results path. For example, "C:\Temp\Res_01"
ResultCleanName Results name. For example, "Res_01"
ResultLocation Results directory. For example, "C:\Temp"
Note: ResultName (full path) = ResultLocation (directory) + ResultCleanName (name)

Well, let's see different variants of how to open and run LoadRunner Controller script:

Open LoadRunner Controller:
Wlrun.exe

Open LoadRunner Controller scenario 'scenario.lrs' and do not execute it:
Wlrun.exe -TestPath scenario.lrs

Open LoadRunner Controller scenario 'scenario.lrs', execute it, and save results to default folder ('C:\Documents and Settings\user_login\Local Settings\Temp\res'):
Wlrun.exe -Run -TestPath scenario.lrs

Open LoadRunner Controller scenario 'scenario.lrs', execute it, and save results to 'res_folder' folder:
Wlrun.exe -Run -TestPath scenario.lrs -ResultName res_folder

Open LoadRunner Controller scenario 'scenario.lrs', execute it, save results to 'res_folder' folder, and after that start Analysis on created results with default template:
Wlrun.exe -Run -TestPath scenario.lrs -ResultName res_folder -InvokeAnalysis


And please see more complex example for desert Smile

Open LoadRunner Controller scenario 'scenario.lrs', execute it, save results to 'res_folder' folder, and after that start Analysis on created results with default template. Repeat all these steps 10 times:
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
Result is:


Well, where to use execution from a command line?
It can be very useful in some cases, when you plain to:

run LoadRunner Controller and pass its results to LoadRunner Analysis
run LoadRunner scripts by schedule
Related topics
Do you use css to design a website?
PHP safety?
Nameservers
help!i am in trouble!
Skype
FAT32 to NTFS
Do good dancing skills make a person more attractive?
questions for Christians
"Self Pleasure" - Good Or Bad?
Need suggestions about design
loadrunner
Obama helps strengthen General Electric-Putin ties
Government Helps Fuel a New Era of Wall Street Wealth
Amazing revelation: caffeine helps you focus :0
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.