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.
- In the Snapshot pane, select the data that you want to correlate.
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.
- Click the Details bar to display details about the correlation.
- Make sure that the Original Snapshot Step tab is visible. Notice that the type is either Data Range or Boundary Based.
- Click Correlate to perform the correlation of the Vuser script.
Click Close to close the Design Studio. Notice that VuGen has inserted the appropriate correlation functions and comments into the script.