Record and replay TruWeb scripts in VuGen

You can generate a TruWeb script in VuGen by building it from an existing HAR file, or by recording a business process using the TruWeb Proxy Recorder. You can then replay and debug the script.

The generated script TruWeb Vuser script can be opened in TruWeb standalone, and run in Controller or any other product that supports TruWeb scripts.

Note:  

  • Generating TruWeb scripts in VuGen is supported starting from version 12.62.
  • For the WebSocket protocol, replay is supported starting from VuGen 12.62, and recording and code generation starting from VuGen 12.63.

Generate a script from a HAR file

You can generate a TruWeb Vuser script from a list of web requests compiled in a HAR network traffic file (capture file).

To generate a TruWeb script from a HAR file:

  1. Create a TruWeb Vuser script. For details see, Create and open Vuser scripts.
  2. Click the Record button on the VuGen toolbar to open the Start Recording dialog box.
  3. The Record into action field displays the only available option, Main.
  4. In the Record field, select Captured Traffic File Analysis.
  5.  In the Captured file field, browse to the HAR file location, or enter the path to the file.
  6. Select the required script Level, to generate a URL-based script, or pages with a resource-based script.
  7. Click Start Recording. VuGen analyzes the capture file, generates the script content, and opens the Recording Report.

Back to top

Record a script with the Proxy Recorder

You can record a business process locally or on a remote machine, using the TruWeb Proxy Recorder. TruWeb supports record and replay for scripts based on the transport level protocol (HTTP, HTTPS, and HTTP/2), and WebSocket protocol.

Note: If you want to record a server that is located on the local host (127.0.0.1/localhost), use the actual, local IP address in the address bar, so that the proxy recorder catches the data transportation.

For example, if the machine IP is 12.12.12.12, instead of using http://localhost:<port> or http://127.0.0.1:<port>, use http://12.12.12.12:<port>.

To record a TruWeb script with the Proxy Recorder:

  1. Create a TruWeb Vuser script. For details see, Create and open Vuser scripts.
  2. Click the Record button on the VuGen toolbar to open the Start Recording dialog box.
  3. The Record into action field displays the only available option, Main.

  4. In the Record field, select Remote Application via TruWeb Proxy.
  5. If required, change the port value.
  6. Leave the TruWeb Proxy IP field blank to use the default value, or select an option from the dropdown list.
  7. Select the check box for Allow remote if you want to record on a remote machine.
  8. Select the check box for Use a proxy server if you need to use a corporate proxy server to record external applications, and fill in the proxy server details.
  9. Select the required script Level, to generate a URL-based script, or pages with a resource-based script.
  10. Click Start Recording:

    • If recording on the local machine, VuGen opens an incognito window in Chrome (default).
    • If you are recording on a remote machine, manually open the required browser window. Configure the proxy settings for the browser, to specify the VuGen machine as the proxy server. Specify the VuGen machine address, and the port on which the TruWeb Proxy Recorder will listen.

    The TruWeb script recording toolbar is displayed, providing the main VuGen recording functionality options, including creating transactions during recording. For details, see Floating recording toolbar.

    Note: The ability to insert comments while recording is not included.

  11. When you have finished recording your business process, click Stop Recording. VuGen generates the script and opens the Recording Report.

Back to top

Replay and debug TruWeb scripts

TruWeb has a dedicated view in runtime settings, to configure settings for your script. To open it, select Replay > Runtime Settings > TruWeb Settings (added for VuGen 12.63).

You can use most of VuGen's standard debugging features to identify and resolve errors when replaying your TruWeb Vuser scripts in VuGen.

When debugging TruWeb scripts, the VuGen toolbar contains an additional button to run the scripts: Replay without debug. This enables you to run the script to the end, without pausing script execution at breakpoints and other debugging points.

For information on debugging in VuGen, see Debugging Overview.

Note: Conditional breakpoints are supported for TruWeb scripts starting from VuGen 12.63.

Back to top

See also: