How to Correlate Scripts - Winsock (Snapshot Pane)

VuGen's Design Studio provides a user interface for correlating Vuser scripts. Correlation is required when working with dynamic data. A common issue with Winsock Vuser scripts is dynamic ports—ports whose numbers are assigned dynamically. While certain applications always use the same port, others use the next available port. If you try to replay a script and the recorded port is no longer available, your script will fail to replay. To overcome this issue, you must perform correlation—save the actual runtime values and use them within the script.

VuGen uses lrs_save_param and lrs_save_searched_string functions correlate Winsock scripts. This means that it stores the data that is received for use in a later point within the script. Since correlation stores the received data, it applies only to Receive buffers and not to Send buffers. The recommended procedure is to select a string of dynamic data within the Receive buffer that you want to correlate. Use that same parameter in a subsequent Send buffer.

Correlate a Winsock script

You use the Snapshot pane to begin correlating Winsock Vuser scripts. Both the Text and the Hex tabs in the Snapshot pane have the correlating functionality.

  1. In the Snapshot pane, select the data that you want to correlate.
  2. Right-click in the selection, and select Create Correlation or Create Boundary Correlation. The Design Studio opens and displays the Correlation tab.

    Note that you can click the number of occurrences in the Replace/Found column to enable you to choose the exact occurrences that you want to correlate.

  3. Click the Details bar to display details about the correlation.
  4. Make sure that the Original Snapshot Step tab is visible. Notice that the type is either Data Range or Boundary Based.
  5. Click Correlate to perform the correlation of the Vuser script.
  6. Click Close to close the Design Studio. Notice that VuGen has inserted the appropriate correlation functions and comments into the script.

Back to top

See also: