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.
Correlating 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.
For further details on how to use the Design Studio, see Correlation Tab [Design Studio] Overview.
Parameterization versus Correlation
This type of correlation should not be confused with simple parameterization. Simple parameterization (Design > Parameters > Create New Parameter) applies only to data within Send buffers. You set up a parameter and assign it several values. VuGen uses the different values in each of the script runs or iterations.
For details on how to manually correlate a Winsock Vuser script, see Winsock Manual Correlation.