Note: This topic applies to Web - HTTP/HTML Vuser scripts written in C only.
Note: It is possible to perform many of these string manipulation procedures by using LoadRunner's built-in DFEs (Data Format Extensions). For details, see Data Format Extensions (DFEs) - Overview.
Note: It is possible to implement Base64 decoding and encoding using LoadRunner's built-in Base64 DFE (Data Format Extension). For details, see Data Format Extensions (DFEs) - Overview.
Note: It is possible to implement URL decoding and encoding using LoadRunner's built-in URL Encoding DFE (Data Format Extension). For details, see Data Format Extensions (DFEs) - Overview.
Note: It is possible to access objects inside JSON-formatted data by using LoadRunner's built-in JSON-To-XML DFE (Data Format Extension). For details, see Data Format Extensions (DFEs) - Overview.
web_js_run( "Code=xor((LR.getParam('buffer'), 0xFFFF));", "ResultParam=param", LAST);
web_js_run( "File=XMLHTTPRequest_sync_sample.js;", "ResultParam=param", LAST);
For details on the above functions, and examples of how they can be used, see the Function Reference (Help > Function Reference).
Advances the specified parameter to the next value in the file.
parameter. The name of the parameter to advance. Must be a parameter of type file or unique number.
Saves a string to a parameter, creating the parameter if it does not exist.
name. The name of the parameter in which to save the value.
value. The value.
|LR.freeParam(name)||Deletes a dynamic parameter at runtime, freeing its buffer.||
name. The parameter name.
Returns the value of the specified parameter.
name. The parameter name.
Logs a message.
text. The message.
level. One of the following:
example: LR.log("text", "Error");
Records a user-defined data point for analysis.
name. The name of the data point. Do not begin a data-point name with any of these strings: HTTP, NON_HTTP, RETRY, mic_, stream_, mms_
value. The numeric value.
For user interface details, see Preferences View - Internet Protocol.
- If the Simulate a new user on each iteration > Clear cash on each iterationruntime setting is selected, web_js_reset is called automatically at the start of each iteration.
- If Simulate a new user on each iteration > Clear cash on each iteration is not set, avoid excessive memory consumption by inserting web_js_reset calls in your Vuser script at points where you no longer need the saved context.
For details on the web_js_reset function, see the Function Reference (Help > Function Reference).
For details on the runtime settings, see the hints below the option in the runtime settings view.