LoadRunner recording does not get token

Source: Internet
Author: User

Use LoadRunner 12 to record a login script for a Web page of a project that is currently being developed, and always prompt the following error message when playing back:?

1. Token was wrong, the server encountered an internal error?

2, Error-26612:http status-code=500?

3, Web_custom_request ("login") highest severity level is "ERROR", 2531 body bytes,204 header Btyes?

See 500 error, think of is a code problem, after and development confirmed, the request Token,cookie in the header is no problem. Since I'm not familiar with how tokens, cookies, and so on are handled in scripts, record another login script for the system we're using and compare it to my script. Discovers that the recorded script of the system being used can fetch the cookie value, and automatically adds the Web_add_cookie () function and automatically associates it, and no cookie-related content is found in the system script being developed. So you can determine that the token or cookie that the server responds to is not captured when recording.

Then to see the recording configuration information inadvertently resolved the problem. The method is as follows:?

1. Enter the recording Options > HTTP Properties > Advanced page?

2, hit you recording schemes in the Headers button, enter the headers pop-up page?

3. Select "Record headers not in list", tick "Csrf-token" in the list box below (check the parameters in the request header against your HTTP request header). )?

4. Click OK?

After setting up and re-recording the script, you will find that the new recorded script has more than one function Web_add_header ("X-token", "Specific value"), before playing back the script, select the token value right-click to select "Correlate Selection" to associate, Then the replay was successful.?

Note: If you do not make these settings, you should also add Web_add_header ("X-token", "concrete value") functions directly before the request script after recording, or you can do so. Similar cookie,session can be handled as well.

Reprint: http://blog.sina.com.cn/s/blog_14b788a260102vhcb.html

LoadRunner recording does not get token

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.