Sunday, June 10, 2007

Schedule the LoadRunner script for playback

When monitoring transactions in a production environment, it is recommended that you check the status of the transaction on a regular basis. For example, you could create a LoadRunner script that logged into your web application every 5 minutes. To schedule LoadRunner to run automatically on a regular schedule, you can use a tool like Windows Scheduler that comes with the Windows operating system.

Click Start -> Control Panel -> Scheduled Tasks.
Click Add Scheduled Task and then click Next to start the wizard.



Click Browse.
Select mdrv.exe and click OK. An example location is C:\\Loadrunner\bin\mdrv.exe
Change the name of the job to be more descriptive. For example, you might use the name of a LoadRunner script, such as PlantsByWebSphere.



Select the frequency to run LoadRunner by clicking Daily and Next. Daily is the shortest interval.



Configure the schedules start date and time and click Next.



Enter the user name and password for the user who runs this job and click Next.



Select Open advanced properties for this task when I click Finish and click Finish.



Edit the Run field with the command line options to invoke the LoadRunner script.

See to the LoadRunner Help documentation for full command reference details. For example:
C:\\Loadrunner\bin\mdrv.exe
-usr C:\\LoadRunner\scripts\PlantsByWebSphere.usr
-out C:\\itcam\logs\PlantsByWebSphere.out
-lr_view -drv_log_flush -drv_log_file C:\\itcam\logs\
PlantsByWebSphere.log
-cci_debug -cci_trace
Select the Schedule tab.



Click Advanced.
Select Repeat task.
Edit the schedule to run as frequently as you want.
Click OK.

No comments: