Tuesday, April 10, 2012

Setting the Run-Time-Settings programmatically

Is it possible to programmatically set the Run-Time Settings through VuGen scripts instead of using the Run-Time Settings dialog box.
We have variety of functions available with LR which can be used to fulfill this purpose.

1. lr_set_debug_message:    Run-Time Settings -> Log

2. lr_think_time:    Run-Time Settings -> Think time
 
3. lr_continue_on_error:    Run-Time Settings -> Miscellaneous -> Error handling -> Continue on error

·     4. When working with RTE Vusers, you can control error handling for specific functions. You insert an lr_continue_on_error(0); statement before the function whose behavior you want to change. The Vuser uses the new setting until the end of the script execution or until another lr_continue_on_error statement is issued. 

      For example, if you enable the Continue on Error feature and the Vuser encounters an error during replay of the following script segment, it continues executing the script.

TE_wait_sync();
TE_type(...);

To instruct the Vuser to continue on error for the entire script, except for the following segment, select the Continue on Error option and enclose the segment with lr_continue_on_error statements, using 0 to turn off Continue on Error and 1 to turn it back on:

lr_continue_on_error(0);
TE_wait_sync();
lr_continue_on_error(1);

5. web_set_sockets_option("PROXY_INITIAL_BASIC_AUTH", "0")
To instruct the Vusers to wait for the proxy response during replay, and not to assume that the proxy supports basic authentication

  
 6. web_set_timeout :   Run-Time Settings -> Preferences -> Option -> Connect/Receive/Step Download timeout

7. web_enable_keep_alive:    Run-Time Settings -> Preferences -> Option -> Keep-Alive HTTP connection
 
8. web_set_max_retries :   Run-Time Settings -> Miscellaneous -> Error handling -> Run-Time Settings -> Preferences -> Option -> Max number of <META refresh> to the same page

9. ctrx_set_waiting_time:    Run-Time Settings -> Timing -> Connect timeout

Some additional Run-Time-Settings

10. lr_abort:    Aborts Vuser script execution.
 
11. lr_disable_ip_spoofing:    Disables IP Spoofing.
 
12. lr_enable_ip_spoofing:    Enables IP Spoofing.

13. lr_exit:    Exits from the script, action, or iteration.

14. lr_rendezvous:    Sets a rendezvous point in a Vuser script.
 
15. lr_rendezvous_ex:    Sets a rendezvous point in a Vuser script.

No comments:

Post a Comment