Understanding Correlation - PowerPoint PPT Presentation

About This Presentation
Title:

Understanding Correlation

Description:

Title: Understanding Correlation Subject: Understanding Correlation Author: Understanding Correlation Last modified by: Y N GUPTA Document presentation format – PowerPoint PPT presentation

Number of Views:163
Avg rating:3.0/5.0
Slides: 18
Provided by: Unders
Category:

less

Transcript and Presenter's Notes

Title: Understanding Correlation


1
Understanding Correlation In HP LoadRunner
gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
2
Correlation
  • What is correlation
  • Types of Correlation
  • Automatic Correlation
  • Manual Correlation

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
3
What is Correlation
  • Sometime, after creating a script, a simple
    playback fail even though the recording of the
    same actions succeeded.
  • 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.
  • LoadRunner addresses this issue through
    correlation. Correlation saves the changing
    values to a parameter.
  • When running the emulation, the Vuser does not
    use the recorded valueinstead, it uses the new
    value assigned to it by the server.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
4
Automatic Correlation
  • Open HP Web Tours.
  • Select Start gt Programs gt LoadRunner gt Samples gt
    Web gt HP Web Tours Application. A browser opens
    with the HP Web Tours home page.
  • Click the administration link on the HP Web Tours
    home page. The administration page opens.
  • Select the 3rd checkbox entitled Set LOGIN
    form's action tag to an error page.
  • Scroll down to the bottom of the page and click
    Update.
  • Scroll down to the bottom of the page and click
    the Return to the Web Tours Homepage link.
  • This setting tells the server not to allow
    duplicate session IDs.
  • Close the browser.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
5
Automatic Correlation
  • In the modified configuration of HP Web Tours,
    the server assigns a unique session ID to the
    Vuser. If you try to play back the script, it
    will fail.
  • To overcome this issue, you use VuGen to
    automatically detect the need to correlate the
    session ID.
  • After you run the script, VuGen prompts you to
    scan the script for correlations.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
6
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.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
7
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.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
8
Automatic Correlation
  • VuGen inserts a new step at the top of the script
    saving 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.
  • Select View gt Tree View to view this new step in
    the test tree.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
9
Automatic Correlation
  • View gt 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 gt
  • The statement instructs VuGen to save the first
    occurrence of this data to a parameter called
    WCSParam_Diff1.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
10
Automatic Correlation
  • Select Vuser gt Run to replay the script again.
    When the replay ends, select View gt Tree View.
  • Look in the Replay Log tab. Note that VuGen no
    longer issues the red-colored error messages.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
11
Automatic Correlation
  • In the script, right-click Service Reg Save
    Param and select Go to step in Replay Log. VuGen
    places the cursor at the corresponding line in
    the replay log.
  • The log indicates that function
    web_reg_save_param succeeded, indicating that the
    correlation worked.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
12
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 gt
    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.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
13
Manual Correlation
gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
14
Manual Correlation
  • Notice that there is a difference in the
    userSession value in both the scripts.
  • Navigate to Script view and add the following
    line to the code
  • web_reg_save_param("myval", "LBuserSession
    value", "RBgt", LAST )
  • Now search for the userSession value and replace
    the hard-coded valye by parameter as myval
  • Replay the script and notice that it plays back
    successfully.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
15
Manual Correlation
gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
16
Questions - To Review Your Skills
  • What is correlation and why is it done?
  • Perform Automatic correlation on the script.
  • Perform Manual correlation on the script.

gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
17
Thank You
gtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgtgt www.softwaretestinggenius.
com ltltltltltltltltltltltltltltltltltltltltltlt
Write a Comment
User Comments (0)
About PowerShow.com