Create TruWeb scripts from recordings

Record a business process in your web browser, or using the TruWeb Proxy Recorder, and save it as a HAR file. Then use the TruWeb Offline Script Generator tool to generate the HAR file into a TruWeb script.

You can record your application in a web browser or using the TruWeb Proxy Recorder, export it to a HAR file, and generate a TruWeb script from the HAR file using the TruWeb Offline Script Generator tool.

Recording with browser

Use the following guidelines when recording your application using a browser.

  1. In your browser's development tools, ensure that the following network settings are configured:

    • Make sure that logs are set to be preserved

    • Make sure that cache is disabled
  2. Make sure that the browser is recording traffic. If not, start the recording.
  3. Perform the business process actions that you want to record. Wait for the business process to complete and for all the resources to finish uploading. Then save the traffic to a HAR file.
  4. Use the TruWeb Offline Script Generator tool to generate a TruWeb script from the HAR file.

Example: Recording in Chrome on Windows:

  1. Start Chrome and press F12 on your keyboard to enable DevTools.
  2. On the Network tab, select Preserve log and Disable cache.
  3. Make sure that recording has started—indicated by the red, glowing circle on the top left of the DevTools pane. If it has not started, press Ctrl+E to start it.
  4. When the business process is complete and all resources have finished uploading, right-click any line in the traffic area and select Save as HAR with content. Save the HAR file in the location of your choice.

Note: In some cases, the browser does not save the response headers and body in the HAR file. These parts of the response are sometimes required during script generation (for example, for application of correlation rules), and if the relevant response information is missing, the script may be generated incorrectly. If this occurs, consider using the Proxy Recorder to generate the HAR file instead.

Back to top

Recording with the TruWeb Proxy Recorder

The TruWeb Proxy Recorder tool is available from the TruWeb area of the AppDelivery Marketplace.

To record your business process with the Proxy Recorder:

  1. Prerequisites:

    1. Download the ZIP file containing the TruWeb Proxy Recorder. It is listed together with the TruWeb download that is appropriate for your environment. Extract the contents locally.
    2. Configure your system's proxy to user the Proxy Recorder server: Address: localhost; Port: 8156. The proxy must be set to be used for all addresses.

      For example in Windows 10, define these settings in Manual proxy setup, and make sure that Don’t use proxy server for local addresses is not selected.

  2. Start a terminal window and change to the TruWeb Proxy Recorder directory.

  3. Run the TruWeb Proxy Recorder, appending the name of the HAR file where the recorded traffic will be saved:

    • Windows: : ProxyRecorder.exe <har file name>
    • Linux/MacOS: ProxyRecorder <har file name>

    Tip: For more command line options, refer to the TruWeb Proxy Recorder help (Documentation.html) in the TruWeb Proxy Recorder installation folder.

    The Proxy Recorder window opens.

  4. Perform your business flow in your web browser. Make sure to:

    • Open a new instance of the browser before each run.

    • Work in private browsing mode (for example, Incognito Mode in Chrome).

  5. In the Proxy Recorder window, press Enter to finish recording and create the HAR file.

    Note: Make sure that the process is complete before using the HAR file.

  6. Use the TruWeb Offline Script Generator tool to generate a TruWeb script from the HAR file.

Back to top

See also: