Record and generate a TruWeb script

You can create TruWeb scripts by recording your business process into a HAR file, and then generating a TruWeb script from the file.

You capture your HAR file using the TruWeb Proxy Recorder. Alternatively, the HAR file can be browser-generated, or recorded using Telerik Fiddler.

Recording is supported for the latest web technologies for HTTP, HTTPS, and HTTP/2, as well as for the WebSocket protocol (using the Proxy Recorder).

Recording with the TruWeb Proxy Recorder

Note: Replay is supported for the WebSocket protocol starting from TruWeb version 2019.2.4, and recording and code generation starting from version 2019.5.4.

The TruWeb Proxy Recorder enables you to record your business process from your chosen browser and export it to a HAR file. The TruWeb Proxy Recorder is available in both TruWeb Standalone and in VuGen.

For details, see TruWeb Proxy Recorder.

Back to top

Recording with a browser

Record your application using any browser and save the traffic to a HAR file.

To create a brower-generated HAR file:

  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 Fiddler

You can capture your HTTP(s) traffic using Telerik Fiddler, and export it to a HAR file.

Note: By default, Fiddler only stores non-textual (binary) response body content smaller than 32KB. This limit can be increased by setting a Fiddler preference using the following string:

fiddler.importexport.HTTPArchiveJSON.MaxBinaryBodyLength

To create a HAR file through Fiddler:

  1. Record your business process actions using Fiddler . Wait until the business process is complete, and all resources have finished uploading, before continuing.
  2. Select File > Export Sessions > All sessions.
  3. In the displayed Select Export Format dialog, select HTTPArchive v1.2 and click Next.
  4. Save the HAR file to your chosen location.
  5. Use the TruWeb Offline Script Generator tool to generate a TruWeb script from the HAR file.

Note:  

  • The exported HAR does not contain a pages section.
  • The created TruWeb script will be URL-based.

Back to top

See also: