About associations in LoadRunner

Source: Internet
Author: User
Tags website server
About associations in LoadRunner

Release: | Author: reposted on the Internet | Source: reposted on the Internet | view: 1368 | go to the software testing forum for discussion

In the software testing era, when a script is recorded, vugen intercepts the client (browser) and server (website Server).

When the script is executed, vugen is disguised as a browser. Then, based on the script, it runs the web browser and the website server again.

Therefore, the content recorded in the script should be exactly the same as what the server said during the recording. In this way, some smart servers still fail. In this case, we need to use correlation to allow vugen to successfully cheat the server again.

What is correlation )?
The so-called correlation refers to converting some hard-coded data in the script into dynamic data sent by the server, which is different each time.

The following is an example:

When the script is recorded, the browser sends a request for webpage a. the server sends the content of webpage A to the browser and carries a data id = 123, when the browser sends the request for web page B again, the id = 123 data is used, and the server will think that this is a legal request and send the content of web page B back to the browser.

What happens when the script is executed? When the browser sends a request for web page B again, it uses the originally recorded id = 123 data instead of the id = 456 newly sent by the server, and the execution of the entire script will fail.

Use the following illustration:

What will happen to the specific error message?

The error message may remind you to log on again, but it may also directly display the HTTP 404 error message.
VuGen provides two methods to help you find the value of correlation:
1. Automatic Association
2. Manual Association
Automatic Association
The VuGen built-in auto-correlation engine can automatically identify the values to be associated and automatically use the association function to establish the association.
Automatic Association provides the following two mechanisms:
? Rules Correlation: during the recording process, VuGen automatically finds the value to be associated in real time based on the specified Rules. There are two rule sources:
O built-in (Built-in Correlation ):
VuGen has targeted common application systems, such as AribaBuyer, bluemarini, BroadVision, InterStage, mySAP, NetDynamics,OraclePeopleSoft, Siebel, SilverJRunner, and other built-in association rules. These application systems may have more than one association rule. You can enable association rules in [Recording Options]> [Internet Protocol]> [Correlation]. When you record scripts of these application systems, VuGen automatically creates associations in the scripts.
You can also view the definition of each association rule in Recording Options> Internet Protocol> Correlation.
Follow these steps to use Rule Correlation:
1. Enable auto-correlation
1. choose Tools> Recording Options in VuGen, open the Recording Options dialog box, select Internet Protocol> Correlation, and select Enable correlation during recording ], to enable automatic association.
2. assume that the recording application system is a built-in association rule system, such as AribaBuyer, bluemarini, BroadVision, InterStage, mySAP, NetDynamics, Oracle, lelesoft, Siebel, and SilverJRunner, select the corresponding application system.
3. You can also add a new association rule to the recording application system, which is a custom association rule.
4. Set how VuGen can handle data that meets the association rules:
[Issue a pop-up message and let me decide online]: jumps out of a message dialog window and asks if you want to establish an association. §
[Perform correlation in sceept]: Automatically Establishes an association.

Manual Association
The execution process of manual Association is roughly as follows:
1. Use the same business process and data to record two scripts
2. Use the WinDiff tool to help identify the data to be associated
3. Use the web_reg_save_param function to manually establish an association.
4. Replace the associated data in the script with Parameters
Next, we will explain in detail how to perform each step.
Use the same business flow and data to record two scripts
1. record a script and archive it.
2. Record the Second Script and save the disk according to the same operation steps. Note that all the steps and input data must be the same so as to find the dynamic data generated by the server.
Sometimes the same input data cannot be used, so you must remember the input data you used before you can determine whether the data you entered is changed or not.
Use the WinDiff tool to locate the data to be associated
1. In the second script, choose Tools> Compare with Vuser… In VuGen ...], Select the first script.
2. Then, WinDiff is enabled. Two scripts are displayed at the same time and the differences are shown. WinDiff will mark the script with a whole line of yellow, and display the really different text in red. (If no red font is displayed, choose Options> View> Show Inline Differences ]).
3. Check the differences in the two scripts one by one. Each difference may be related. Select the script for the difference and copy it.

4. Then use some functions to implement Association

I just talked about it.LRWhy do scripts need to be associated? association includes manual Association and automatic association. For more details, refer to the LR user manual.

The article comes from http://www.ltesting.net in the software testing age/

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.