Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
In HP LoadRunner
Correlation
What is correlation
Types of Correlation
Automatic Correlation
Manual Correlation
What is Correlation
Many applications use dynamic values that change each time you use
the application. For example, some servers assign a unique session ID
for every new session. When you try to replay a recorded session, the
application creates a new session ID that differs from the recorded
session ID.
When running the emulation, the Vuser does not use the recorded
valueinstead, it uses the new value assigned to it by the server.
Automatic Correlation
Automatic Correlation
Automatic Correlation
You will instruct VuGen to insert a step that saves the original session
ID to a parameter. In each replay session, VuGen saves the new
unique session ID to a parameter. In the subsequent steps, it uses the
saved value instead of the originally recorded value.
Record a new script with the same steps that you recorded previously
and save the script as Basic_Tutorial_Cor.
Click Verify Replay in the Task Pane and click the Start Replay button
at the bottom of the instruction pane. VuGen runs the new script. You
may notice several error messages in the Replay Log tab in the Output
window, indicated by the red-colored text.
Click Verify Replay in the Task Pane to view the Last Replay Summary.
Automatic Correlation
Click the link Show and resolve dynamic server values in the instruction pane under the heading
Dynamic Server Values.
VuGen scans the script, searching for differences between the recorded values and the playback
values.
VuGen displays a list of these differences that may require correlation in the Correlation Results
tab in the Output window.
Select the first entry in the Correlation Results tab, and click Correlate.
Automatic Correlation
Automatic Correlation
View > Script View to view the correlation statement in the script.
This statement means Check the server response for data located between the
following two strings:
Left boundary: userSession value=
Right boundary: >
The statement instructs VuGen to save the first occurrence of this data to a
parameter called WCSParam_Diff1.
Automatic Correlation
Automatic Correlation
Manual Correlation
Record a new script with the same steps that you recorded previously
and save the script as Manual_Cor_1.
Record another script using the same steps as above and save the
script as Manual_Cor_2.
Now for script Manual_Cor_2, click on Tools > Compare with script
option and select Manual_Cor_1 script to compare with.
Notice that a WDiff window is displayed, showing both the scripts and
the differences in recording are highlighted in yellow color.
Manual Correlation
Manual Correlation
Navigate to Script view and add the following line to the code:
web_reg_save_param("myval", "LB=userSession value=", "RB=>",
LAST );
Now search for the userSession value and replace the hard-coded
valye by parameter as: {myval}
Manual Correlation
Thank You