Record a Vuser script

This topic describes the overall process for recording a Vuser script.

 

Preparing for a VuGen recording

Before you record a script in VuGen, we recommend that you modify or disable the Windows DEP settings.

To configure the DEP settings:

  1. Open Start > Control Panel > System.

  2. In the Advanced tab, click Performance settings.

  3. In the Performance Options Data Execution Prevention tab, select the first option, DEP for essential services only.

  4. If you cannot change this option, click Add. Browse to the client program, for example IEXPLORE.EXE.

  5. If neither of these options is possible, you can disable DEP completely.

    1. Open a command prompt.

    2. Run the following command: bcdedit.exe /set {current} nx AlwaysOff

    3. Reboot the machine.

    4. Verify that the settings took effect by running the following at the command line: BCDEdit /enum

    5. Verify that nx is AlwaysOff.

Back to top

Recording a script in VuGen

The standard way to record a script is through the VuGen user interface.

To record a Vuser script in VuGen:

  1. Create a new script or open an existing script. For details, see Create and open Vuser scripts.

  2. Configure the recording options (optional). The recording options affect the way a Vuser script is recorded and how it is generated after the recording, To open the recording options, double-click the Recording Options node in the script tree. For details, see Recording options.

    Tip:  

    • Web HTTP/HTML scripts: To generate a Recording Report after recording is finished see Enable/disable the Recording Report.
    • If the business process you want to record contains asynchronous push communication, select Recording Options > HTTP > Advanced > Use streaming mode when recording with the LoadRunner Proxy.
    • If you are not able to successfully record a script with VuGen, select Recording Options > HTTP > Advanced Node and check the Use LR Proxy to record a local application option. Then re-record your business process.
  3. Click the Record button on the VuGen toolbar to open the Start Recording dialog box. For details, see Start Recording dialog box.

  4. Define the relevant information and choose the section into which you want to record. For example, the Init section should contain steps that you do not want to repeat, such as logging in. For details, see Vuser script sections.

  5. Click Start Recording. VuGen's floating toolbar appears, VuGen opens your application and begins recording your actions.

  6. Perform those business processes that you want to record, within your application or browser. Use the floating toolbar to insert transactions, rendezvous points, and comments. You can also use the floating toolbar to specify into which section of the script to record. For user interface details, see Floating recording toolbar.

    Click the Stop button on the floating toolbar when you are finished recording.

    Note: To cancel the recording session, click the Cancel Recording button on the floating toolbar. When you cancel a recording, VuGen removes all of the code that was added to the script during the current recording session, thereby restoring the script to its status before the current recording session. For details on enabling/disabling the Cancel Recording button, see Scripting Options tab.

Back to top

Recording a script using a Chrome extension

If your environment does not allow you to record through VuGen, you can use the LoadRunner Web Recorder extension for the Chrome browser to record events. This may be relevant if your company's security policy blocks the standard VuGen recorder.

Note:  

  • This feature is provided as a tech preview.

  • The extension is not supported for the FireFox browser.

When you record events through the LoadRunner Web Recorder extension, a .har file is generated which you can convert into a VuGen script. For details, see Create a Vuser script by analyzing a captured traffic file.

To install the browser extension:

  1. In the VuGen installation package, locate the archive file:

  2. DVD\Additional Components\HarGeneratorChrome\HarGeneratorChrome.zip

    Copy the file to a local folder and extract its contents.

  3. Install the extension:

    To permanently install the extension, install it as you would normally install any other extension:

    1. Open the Chrome extensions page and select Manage Extensions.

    2. Activate Developer mode.

    3. Click Load Unpacked and browse to the folder of the extracted files.

    4. Click Select Folder.

    To load the extension for the current browser instance only, run the following from the command line:

    chrome.exe --load-extension=<path-to-extension>

To record events using the browser extension:

  1. Open the Chrome extensions and select LoadRunner Web Recorder. The recording window opens.
  2. Indicate whether you want to capture the response body.
  3. Click Start Recording. In your Chrome browser, open a new tab and enter the URL you want to record.
  4. Perform the business processes that you want to record, within your browser. Use the Add/Switch to action button to specify the action into which you want to record.

  5. Use the recording window buttons to insert transactions, rendezvous points, and comments.

  6. Click Stop Recording when you are finished recording. In the resulting popup, enter a script name and click OK. To end a recording and discard its contents, click Cancel.
  7. Locate the <script-name>.har file in your Downloads folder, and convert it into a VuGen script. For details, see Create a Vuser script by analyzing a captured traffic file.

Known issues

The following limitations apply to the Chrome browser recording extension:

  • The extension is only supported for the following protocols: Web - HTTP/HTML, Java over HTTP, SAP - Web, and Siebel - Web.

  • The first blank page opened with the browser will not be recorded. Open a new tab and enter your URL to begin recording events.

  • WebSocket events are not supported.

  • Authorization headers are not recorded since they are filtered out by Chrome.

  • Certain HTTP/HTTPS events, as defined by Chrome, may not contain a response body.

Back to top

See also: