LoadRunner Study Notes-Ajax

Source: Internet
Author: User

Use LoadRunner to test webProgramUsually, Ajax or ActiveX functions include many client functions (usually JavaScript ). What should we do? If you consider this problem from the perspective of function implementation, it will go into a dead end, because LoadRunner is powerless to JavaScript. If we start from the nature of LoadRunner, this problem can be solved. Because LoadRunner is tested based on the protocol, no matter how much Ajax or ActiveX does on the client, as long as it finally sends requests through the HTTP protocol, we can simulate this request to complete the test. Next, we will analyze how to deal with such problems. Taking the BS version of electronic medical records as an example (ActiveX and Ajax technologies are used for medical order input ).

1. Recording script and analyzing script.

 

  

 

 

 

 

2. debug the script.The script can be played back successfully, but the data is not submitted. In this case, we need to check what the HTTP request is during recording. 

 

 

3. Modify the script.In the scriptWeb_custom_request ()Added before FunctionWeb_add_header ("X-ajaxpro-method", "saveorder ");When we play back the data again, the data can be written.

In fact, when we use LoadRunner for testing, we need to consider more issues from the Protocol perspective, not the programming perspective.

 

Related Article

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.