Correlation principle Description

Source: Internet
Author: User

issues associated with

The communication between the client and the server, in part, is that the data is dynamic and each communication is different. The Proxy Recorder is not able to distinguish between static and dynamic information when recording, and all information is recorded in a hard-coded manner. However, if some information does not change during playback, the script cannot be executed successfully. Consider the following scenario:

As shown, user JoJo Log in to a Web server with Jojo/bean's account/password, query for information about a product, and record all communication packets for the transaction by Vugen. The Web server returns a dynamic session ID to JoJo: [email protected] as the session ID for this login. Since Vugen is unable to know what information is dynamic, it will record all the data in the form of a single full collection. Then JoJo according to the Web server told his SessionID to query the product list, the transaction can be carried out normally.

We will observe that when Vugen generates an HTTP script from a captured communication packet, SessionID is hard-coded, which is "write dead" inside the program. What happens when we replay the script without modification? As shown in the following:

According to the script at the time of recording, JoJo Log in with Jojo/bean, the WEB server returns to JoJo a dynamic session ID: [email protected], this value is not recorded when the [email protected], but the new value: [ Email protected]. Then the script will still use [email protected] to execute the following transaction based on the value of the recorded SessionID. Because the session ID is timeliness, after the user exits the system, its SessionID will be invalidated, then the server will give a "SessionID failure" error, resulting in the script will not be able to perform properly.

The general workaround for the above problem is as follows:

In the first time from the server to get SessionID, put it in a variable <session_id> inside, in the script to access the server's statement, all the "[email protected]" replaced with a variable <session_id > will be able to solve this problem satisfactorily.

This kind of problem is very common in any system of external problems. The common pattern is: "The server returns some dynamic value to the client, and when the client uses these values to access the server, the values cannot be written to the script but should be stored in a variable." "This is the concept of association.

The associated work tends to occupy most of the development script, because we have to perform detailed analysis of each specific system to determine the dynamic information it needs to correlate.

Correlation principle Description

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.