Sunteți pe pagina 1din 3

Load Runner

LoadRunner creates new scripts with three sections:

o o o

vuser_init for initializing a Vuser. Vusers are in "Init" status when executing this action. Action action is repeated for multiple iterations. Vusers are in "Running" status when executing this action. vuser_end for Vuser logoff. Vusers are in "Exiting" status when executing this action.

If you don't include the correct library when you use a function from that library, you will see message

Error -- Unresolved symbol


The run-time settings define the way that the script runs. For example a user who stops and thinks before each response. To specify how many times the Vuser should repeat its set of actions. Configuration of Run Time Settings Run-Time Settings - The run-time settings define the way that the script runs. Run Logic Pacing - The Pacing Run-Time settings let you control the time between iterations. The pace tells the Vuser how long to wait between iterations of your actions. You instruct the Vusers to start each iteration using one of the following methods: As soon as the previous iteration ends. After the previous iteration ends with a fixed/random delay of At fixed/random intervals, every / to seconds. Log Settings - To determine how much information should be logged to the output. Standard Log: Creates a standard log of functions and messages sent during script execution to use for debugging. Extended Log: Parameter Substitution Data returned by Server Advanced Trace

Think Time : lr_think_time(10) waits ten seconds Network Run-Time Settings : Using the Speed Simulation settings, you can select a bandwidth that best emulates the environment under test. Browser Settings : You can set the browser properties in the following areas: a. User-Agent (browser to be emulated) b. Simulate browser cache c. Download non-HTML resources d. Simulate a new user each iteration e. You can also set advanced options for caching and checking for newer resources Internet Preferences Miscellaneous Run-Time Setting

Enhance script

Add transaction statements to obtaintransaction timings for each screen in the GUI. Add display values to aid debugging. Add verification checkpoints to detect whether the intended text or image is displayed after each script action. Parametize hard-coded URLs, user id, passwords, and other variable data byinserting in its place a new parameter such as aDate/Time stamp and entire files obtained dynamically so that the script can dynamically replace parameters to simulate use of different data during a run. Add retry logic to handle forseeable errors. Add randomizers to vary script action to mimic real life loads. Add if/else logic to check results and take appropriate action and exit the script when appropriate. Add statements to capture data in one screen for use in another command. This is needed to prevent chronic "script timout" errors and when working with web apps using Microsoft .NET web forms technology. Add statements to call functions in external run libraries to save and retrieve data from an in-memory Virtual Table Server .

Handle XML. Add statements to emulate Javascript issued from clients. Add statements to manage time-out. Calculate & subtract Wasted Time from transaction timers Output Logs. Add Rendezvous points Add Timings