LoadRunner Study Notes--ajax

Source: Internet
Author: User

When testing a Web program with LoadRunner, you always run into Ajax or ActiveX implementations, which typically contain many client functions (typically JavaScript). How do we deal with it? If you consider this problem from the perspective of functional implementation, you will go into a dead end because LoadRunner is powerless for JavaScript. If we start from the nature of LoadRunner, then the problem will be solved. Because LoadRunner is a protocol-based test, no matter how much Ajax or ActiveX does on the client, as long as it finally sends the request through the HTTP protocol, we can simulate the request to complete the test. Next analyze how to deal with this kind of problem, take the electronic medical record BS version of Doctor's order input as an example (the medical advice input part uses ActiveX technology and AJAX Technology).

1, record the script, analyze the script.

2, Debug script. the script was found to be replayed successfully, but the data was not submitted. At this point we need to see what the HTTP request looks like when recording.

3, modify the script. we need to add web_add_header ("X-ajaxpro-method", "Saveorder")in the script before the web_custom_request () function; When we replay it again, the data can be written.

In fact, when we use LoadRunner to test, we should consider the problem from the point of view of protocol, not the programming angle.

LoadRunner Study Notes--ajax

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.