lr12.53-2nd Lesson: Preparing for Script replay

Source: Internet
Author: User

Lesson 2nd: Preparing for script replay

After you create the VUser script, you can verify it by running it from the Vugen. Sometimes replay will fail, even if the same action was successful during recording.

Many applications use, each use the app?? Changes the dynamic value when the program is For example, some servers specify a unique session ID for each new session. When you try to replay a recorded session, the application creates a new session ID that is different from the recorded conversation ID. When you replay specific types of vuser script dynamic values, such as these unique session IDs, can be problematic. For example, when a dynamic session ID replays a web-http/html script, rather than replaying the truclient script, it often causes problems.

using the LoadRunner Relevance to solve the problem of dynamic values. When you Associate The value, Vugen will save the change value, in our case, the session ID, a parameter. when running the VUser script, VUser does not use the recorded value, instead it takes a new session ID and is assigned to it by the server.

for scripts that contain dynamic parameters, such as session IDs, Vugen automatically prompts you about the recording end value. in the past lessons, we bypassed the relevance to see the script as it was.

In this lesson, you will learn how to correlate dynamic values and facilitate a successful replay.

How do I associate my script?

If you try to replay the VUser script that you recorded unmodified in the 1th lesson: Build VUser Script , replay will fail. the new session ID will not match the ID of the record, and this will result in a failure.

to solve this problem, you can use Vugen's design studio to associate with session ID. Typically, Vugen will scan the script at the end of the recording session and prompt you for a suggested dependency.

However, you can always open design studio to scan related scripts. You can also revoke your work through the design studio without any relationship.

    1. Open the design studio.

      Click the Design Studio button on the toolbar, or select design > Design Studio .

      Vugen will scan the script and its related data to search for possible dynamic values.

    2. The associated session ID.
      1. Select the session ID entry in the Related tab, and then click Attribution Relationship . Vugen will change the state of the session ID and insert a new feature at the top of the VUser script. The new feature holds the parameters for the original session ID.

      2. Close the design studio.
    3. Check the syntax of the related statement.

      in the Vugen editor, locate the function that Vugen will add to the start O script. The new entry is in the following format:

      Web_reg_save_param_regexp (
      "ParamName = Usersession",
      " regular expression = usersession \ value = (. *? ) > \\ñ< table \ \ 's Boundary ",
      "Search_filters",
      " range = Body ",
      "Ignoreredirections = no",
      "Requesturl = */* nav.pl",
      last);

      the Web_reg_save_param_regexp function indicates that Vugen saves the first occurrence of the value contained in the regular expression (unique session ID) to a parameter named usersession .

Note: This article is from the HP website LR Help Center

lr12.53-2nd Lesson: Preparing for Script replay

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.