Run-Time Functions Present in Loadrunner

Run-Time Functions

Below are the most important list of Run Time functions present in load runner.

lr_load_dll :

  • lr_load_dll function loads a DLL (Windows) or shared object (Linux) allowing you to call an external function when replaying using the C interpreter.
  • Once you load the DLL, you can call any function defined in the DLL, without having to declare it.
  • On Windows platforms, except for the SAP GUI protocol, if you do not specify a path, lr_load_dll searches for the DLL using the standard sequence used by the C++ function, LoadLibrary.
  • Example : lr_load_dll("user32.dll");

lr_peek_events :

  • lr_peek_events function suspends the Vuser script run and checks for events before resuming.
    • Scripts written in C language perform this check internally. Therefore, there is no need to use the lr_peek_events function.
    • Scripts written in Java do not perform this check internally. Therefore, insert this function into your Vuser script at the point at which you want the Vuser to pause.
  • Example : lr_peek_events();

lr_think_time :

  • lr_think_time allows you to pause test execution during a run.
  • This is especially useful in simulating think time, the time a real user pauses to think between actions.
  • Example : lr.think_time(1);

lr_rendezvous :

  • lr_rendezvous function creates a rendezvous point in a Vuser script.
  • When this statement is executed, the Vuser program stops and waits for permission to continue.
  • This function can only be used in an action section, and not in vuser_init or vuser_end.
  • Example : lr.rendezvous("QueryRendz");

lr_continue_on_error :

  • lr_continue_on_error function specifies how to handle errors.
  • You can choose to continue running if an error occurs, or to abort the run execution.
  • To continue script execution even when errors occur, select the Continue on Error check box in VuGen's Runtime Settings.
  • Example : lr_continue_on_error(1);

lr_abort :

  • lr_abort function aborts the execution of a script .
  • It stops the execution of the Actions section, executes the vuser_end section, and ends the execution.
  • This function is useful when you need to manually abort a run as a result of a specific error condition.
  • When you end a run using this function, the status is "Stopped."
  • Example : lr.abort( );

lr.exit :

  • lr_exit function allows you to exit from the script run during execution.
  • Example : lr.exit(lr.EXIT_VUSER, lr.FAIL);

Click Here to see all the string function present in loadrunner.

Leave a Reply

Your email address will not be published. Required fields are marked *